On Friday, August 8, 2014 9:25:19 AM UTC-7, Roelof Wobben wrote:
>
> Hello,
>
> I have made this file into spec/models/admin_users.rb
>
> require 'rails_helper'
>
> RSpec.describe Admin, type: :model do
>
> def build_valid_user(opts = {})
> valid_opts = {
> name: "Example adminUser",
> email: "[email protected]",
> password: "foobar",
> password_confirmation: "foobar",
> }
> User.new valid_opts.merge(opts)
> end
>
> it { should respond_to(:name) }
> it { should respond_to(:password) }
>
> context "given a valid user" do
> subject(:any_valid_user) { build_valid_user }
>
> it { should be_valid }
> end
>
> but when I do rspec spec/ I see this output:
>
>
> No examples found.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Finished in 0.00023 seconds (files took 0.07842 seconds to load)
>
>
>
> 0 examples, 0 failures
>
> Roelof
>
Your file name (spec/models/admin_users.rb) doesn't match the default value
of the `pattern` option:
https://relishapp.com/rspec/rspec-core/v/3-0/docs/command-line/pattern-option
Rename your file to `spec/models/admin_users_spec.rb` and it should work.
If you'd like to use an alternate pattern, you can choose a different
value for the `--pattern` option and put it in `.rspec`.
Myron
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/c57df012-6de8-4a61-aed3-0c7047e0feef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.