I have an almost-new Rails 3.1.0 application, and rspec can't find my examples.
duncan@duncan-notebook:~/myapp$ bundle exec rspec
No examples found.
Finished in 0.00004 seconds
0 examples, 0 failures
My spec directory looks like this:
spec/
|-- controllers
| `-- welcome_controller_spec.rb
|-- factories
| `-- users.rb
|-- helpers
| `-- welcome_helper_spec.rb
|-- models
| `-- user_spec.rb
|-- spec_helper.rb
`-- views
`-- welcome
`-- index.html.haml_spec.rb
And there are definitely examples in there. E.g. welcome_controller_spec.rb
contains the following:
require 'spec_helper'
describe WelcomeController do
describe "GET 'index'" do
it "should be successful" do
get 'index'
response.should be_success
end
end
end
I'm running the following versions of rspec & related Gems:
Could someone please tell me how to convince rspec to find my examples? I suspect I'm missing something very simple here.
I'm getting the same results with bundle exec rspec, maybe it was deprecated. Try this instead:
rspec spec
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With