I am following the examples in chapter 2 of “Rails 3 in Action” and
for some reason I have to specify the full path + file name to get my
specs to run. The book and rspec docs led me to believe that I should
be able to just type ‘rspec’ and rspec would find any spec files in a
directory called spec. I even tried adding a .rspec file with
“–default_path spec” in the directory from which I am running
rspec. No luck with that either.
I am using RSpec 2.7.0 and Ruby 1.9.2 under RVM.
My directory structure is:
bacon
lib
bacon.rb
spec
bacon.spec
From the bacon directory:
$ rspec
No examples found.
$ rspec spec
No examples found.
$ rspec spec/bacon.spec
…
Finished in 1.09 seconds
2 examples, 0 failures