The code below:
context "should destroy participation" do
setup do
@p = Factory.create :participation
delete :destroy, :id => @p.id.to_param
end
should_redirect_to(:controller => 'configuration', :action => 'edit')
end
Gives me the error below, any idea why?
RuntimeError: @controller is nil: make sure you set it in your test's setup method.
/test/functional/participation_controller_test.rb:30:in `__bind_1279893888_614853'
/Applications/RubyMine 2.0.2.app/rb/testing/patch/testunit/test/unit/ui/testrunnermediator.rb:36:in `run_suite'
/Applications/RubyMine 2.0.2.app/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:215:in `start_mediator'
/Applications/RubyMine 2.0.2.app/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:191:in `start'