[rspec-users] very odd controller spec problem
Jeff Dean
jeff at jefdean.com
Wed May 16 01:57:40 EDT 2007
Is @fund nil? I'm guessing here, but the []= could be from the underlying
attributes (@fund.id is the same as @fund.attributes['id']).
On 5/16/07, Jim Hughes <jeem at hughesorama.com> wrote:
>
> 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
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070516/27b5a1fe/attachment.html
More information about the rspec-users
mailing list