On Feb 4, 2008 6:54 AM, Raimond G. [email protected] wrote:
NoMethodError: You have a nil object when you didn’t expect it!
The error occurred while evaluating nil.env
Can you show the rest of the backtrace?
Sure, I’m using rspec 1.1.2, the backtrace is nice and clean, to get
the following, I commented out all the IGNORE_PATTERS, there is
probably a better way of doing it, but it worked.
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.env
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/
vendor/rails/actionpack/lib/action_controller/test_process.rb:352:in
delete' ./stories/steps/blog_steps.rb:10:in
the admin clicks on ‘delete’’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
step.rb:16:in __send__' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ step.rb:16:in
perform’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
world.rb:73:in store_and_call' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ world.rb:110:in
When’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_mediator.rb:115:in send' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/story_mediator.rb:115:in
to_proc’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_mediator.rb:95:in instance_eval' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/story_mediator.rb:95:in
to_proc’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_mediator.rb:95:in each' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/story_mediator.rb:95:in
to_proc’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/scenario_runner.rb:14:in instance_eval' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/scenario_runner.rb:14:in
run’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_runner.rb:48:in run_stories' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/story_runner.rb:44:in
each’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_runner.rb:44:in run_stories' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner/story_runner.rb:39:in
each’
/Users/raimondgarcia/Documents/workspace/breport.git/config/…/vendor/
plugins/rspec_on_rails/lib/spec/rails/…/…/…/…/rspec/lib/spec/story/
runner/story_runner.rb:39:in run_stories' /Users/raimondgarcia/Documents/workspace/breport.git/config/../vendor/ plugins/rspec_on_rails/lib/spec/rails/../../../../rspec/lib/spec/story/ runner.rb:46:in
register_exit_hook’
stories/user_blogs.rb:4
Thanks,
Raimond G.