On Wed, Feb 17, 2010 at 5:44 AM, Nickolay Kolev <[email protected]> wrote:
> Hi all,
>
> I am trying to spec a controller for a nested resource:
>
> http://gist.github.com/306521
>
> Running the spec as it is in the gist results in
>
> undefined method `save' for nil:NilClass (line 66 in the gist)
>
> So should_receive is interfering with the build message resulting in
> @course ending up nil.
>
> Is there a way to stub "build" so that the assertion works *and* does
> not result in @course == nil?
>
> Many thanks in advance,
> Nickolay

I don't see @new_course getting defined anywhere. Try assigning it a
non-nil value in each of the POST examples (or in before(:each) in
that group).
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to