[rspec-users] Not seeing the failure
jarkko at jlaine.net
Wed Jan 23 13:05:06 EST 2008
On 23.1.2008, at 18.57, Corey Haines wrote:
> Nope, that still didn't work.
> Still getting
> Here's my spec and code using your recommended way:
> spec - http://pastie.caboo.se/142451
> code - http://pastie.caboo.se/142452
> If I add back
> they pass.
> It seems as though the understanding is that setting up your mock
> with the options (:user => @current_user) should set stubs for both
> get and set, but it doesn't. I think it just sets up the stub for
> the get.
I didn't say it would (and it doesn't and shouldn't):
> You can do it like this:
> @coupon = mock_model(Coupon, :user= => nil, :user =>
> @current_user, :save => true)
Note both :user= and :user.
In your pastie you only have :user
More information about the rspec-users