[rspec-users] very odd controller spec problem

Jim Hughes jeem at hughesorama.com
Wed May 16 01:37:37 EDT 2007


Here's a snippet:

   it "should provide the fund" do
     get(:timesheet,{:id=>@fund.id})
     assigns[:fund].should == @fund
   end

Works fine on my box, fails on my CI server.  Here's the output:

NoMethodError in 'The FundController timesheet should provide the fund'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]=
./spec/controllers/fund_controller_spec.rb:19:
./script/spec:4:

The line raising is the "get" line.  I don't see a foo[bar] = x,  
implied anywhere in the statement.

Has anyone seen this?

Thanks for any help.

Jim


More information about the rspec-users mailing list