[rspec-users] Clear a stub

Steve vertebrate at gmail.com
Mon Jul 28 00:08:48 EDT 2008

Pat Maddox wrote:
...big snip...
> Well, a lot of stuff has happened since then :)  However, I'm not sure
> what your problem is still so I can't tell you that it's been fixed
> since then.  It sounds to me like you're saying reservations(:single)
> returns a Reservation object in one test, but [] in this one.  Is that
> accurate?
> Pat

Yes, that's exactly the case. Just empty arrays in this instance, but 
appropriate Reservation objects in other places. The other thing that 
gets me is that even the other fixtures at this time are correct. Like 
the customers, and users are both fine. It's just the reservations. I've 
also tried moving the fixtures loading up higher in the describe 
nesting, thinking that maybe it had something to do with being used in a 
'shared' describe. That had no effect though. Am I tripping over some 
keyword magic maybe? I have no idea what magic that might be, I'm just 
thinking out loud.

More information about the rspec-users mailing list