[rspec-users] spec for model_id should eql

Jarkko Laine jarkko at jlaine.net
Mon Dec 3 15:34:04 EST 2007


On 3.12.2007, at 21.23, David Chelimsky wrote:

> On Dec 3, 2007 1:18 PM, Jarkko Laine <jarkko at jlaine.net> wrote:
>>
>> On 3.12.2007, at 21.05, Nathan Sutton wrote:
>>
>>> Department.stub!(:find_by_code).with("75").and_return("3")
>>
>> You can't use with() with stub! (only with should_receive), so just
>> leave it away:
>>
>> Department.stub!(:find_by_code).and_return("3")
>
> Actually, you can now, but it's not really documented.

Oh, cool. I take it back, then :-)

//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi




More information about the rspec-users mailing list