[rspec-users] rspec 2.10.0 breaks controller specs...

Patrick J. Collins patrick at collinatorstudios.com
Fri May 4 20:07:47 UTC 2012


Apparently 2.10.0 doesn't like this line in devise's lib/devise/test_helpers.rb
  @request.env['warden'] = Warden::Proxy.new(@request.env, manager) 

...

This worked fine in 2.8.1, but now all my controller specs give me:

Failure/Error: Unable to find matching line from backtrace
     NoMethodError:
       undefined method `env' for nil:NilClass
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/devise-2.0.4/lib/devise/test_helpers.rb:33:in `warden'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-rails-2.10.0/lib/rspec/rails/adapters.rb:15:in `block (2 levels) in setup'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:178:in `instance_eval'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:178:in `instance_eval'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/hooks.rb:23:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/hooks.rb:63:in `block in run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/hooks.rb:63:in `each'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/hooks.rb:63:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/hooks.rb:400:in `run_hook'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:298:in `run_before_each_hooks'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:239:in `run_before_each'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:86:in `block in run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:195:in `with_around_each_hooks'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example.rb:84:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:353:in `block in run_examples'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:349:in `map'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:349:in `run_examples'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:335:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:336:in `block in run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/r 17     def process(*)
spec/core/example_group.rb:336:in `map'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/example_group.rb:336:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb:28:in `map'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb:28:in `block in run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/reporter.rb:34:in `report'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/command_line.rb:25:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/runner.rb:69:in `run'
     # /Users/patrick/.rvm/gems/ruby-1.9.3-p125 at my_app/gems/rspec-core-2.10.0/lib/rspec/core/runner.rb:10:in `block in autorun'

Patrick J. Collins
http://collinatorstudios.com



More information about the rspec-users mailing list