[rspec-users] Stories - Use view matchers rather than assigns[].should?

David Chelimsky dchelimsky at gmail.com
Wed Apr 9 23:09:43 EDT 2008


On Apr 9, 2008, at 10:37 PM, "Tim Haines" <tmhaines at gmail.com> wrote:

> Hi there,
>
> Just want to confirm I have this right.  Writing a story, assigns 
> [:games].length.should == 30 fails for me complaining assigns 
> [:games] is nil.  It seems assigns isn't set for story steps?   I've  
> changed this to response.should have_tag(".game", 30).  Is this  
> correct?

Yep! The step has no access to intervals of the request.

>
>
> Tim.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list