Rspec problems.
by Rabbit
I’m writing this, not because I have an answer, but because I have a question. A question I don’t see anyone else asking. I wonder if I’m unique in having the question, but I doubt it.
I’m writing this, not because I think I’ll get a response, but that hopefully I will find an answer, so that the next person with this same question will find an answer.
Rspec won’t run its tests. Running rake spec or any of its variants failed, saying something like…
Rabbit:~/apps/inkwell rabbit$ rake spec:models
/usr/local/bin/rake:17:Warning: require_gem is obsolete. Use gem instead.
(in /Users/rabbit/apps/inkwell)
/Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:180:in `readlines': No such file or directory - /Users/rabbit/apps/inkwell/config/../spec/spec.opts (Errno::ENOENT)
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:180:in `parse_options_file'
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:136:in `parse'
from /usr/local/lib/ruby/1.8/optparse.rb:1260:in `call'
from /usr/local/lib/ruby/1.8/optparse.rb:1260:in `parse_in_order'
from /usr/local/lib/ruby/1.8/optparse.rb:1247:in `catch'
from /usr/local/lib/ruby/1.8/optparse.rb:1247:in `parse_in_order'
from /usr/local/lib/ruby/1.8/optparse.rb:1241:in `order!'
from /usr/local/lib/ruby/1.8/optparse.rb:1332:in `permute!'
from /usr/local/lib/ruby/1.8/optparse.rb:1353:in `parse!'
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:155:in `parse'
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:88:in `create_behaviour_runner'
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib/spec/runner/command_line.rb:14:in `run'
from /Users/rabbit/apps/inkwell/vendor/plugins/rspec/bin/spec:3
rake aborted!
Command ruby -I"/Users/rabbit/apps/inkwell/vendor/plugins/rspec/lib" "/Users/rabbit/apps/inkwell/vendor/plugins/rspec/bin/spec" "spec/models/tattoo_artist_spec.rb" --options "/Users/rabbit/apps/inkwell/config/../spec/spec.opts" failed
I’ve got Rspec and Rspec::Rails installed as plugins in my vendor directory. I’ve tried reinstalling the plugins but no go. This is a brand-new Rails app on 1.2.3. Anyone…?
Update.
If you’re getting the above error, read the section entitled Bootstrap on the Rspec website, or simply type ruby script/generate rspec. Duh.