rspec/rspec-rails — Issue #452: Undefined method 'metadata'
Author: rizwanreza
Created: 2011-10-09 18:34:55+00:00
State: open

There is a nasty error I am encountering with RSpec. When I am on rspec-rails = 2.5.0, the tests run but rake tasks do not run (undefined method 'prerequisites'). This is fixed in 2.6.1 but when I am on rspec-rails = 2.6.1, the rake tasks start running but I get the following error, and since this happens for every spec, I am assuming RSpec is behind it. Here's the not-so-helpful backtrace:

22) Ability Boq Document Version when the user is documenter and boq is in rejected state
Failure/Error: Unable to find matching line from backtrace
undefined method `metadata' for nil:NilClass
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/activesupport-3.1.1/lib/active_support/whiny_nil.rb:48:in `method_missing'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/capybara-0.4.1.2/lib/capybara/rspec.rb:7
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:324:in `instance_eval'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:324:in `instance_eval_with_rescue'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:45:in `run_in'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:80:in `run_all'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:80:in `each'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:80:in `run_all'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/hooks.rb:126:in `run_hook_filtered'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:226:in `eval_after_eachs'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:149:in `run_after_each'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:54:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:107:in `with_around_hooks'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example.rb:45:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:294:in `run_examples'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `map'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:290:in `run_examples'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:262:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `map'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `map'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/example_group.rb:263:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `map'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:24:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:12:in `report'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21:in `run'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
# /Users/rizwanreza/.rvm/gems/ree-1.8.7-2011.03@monaqasat3/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'

Please let me know if you need any more information. Thanks!!