[rspec-users] #stub! and #should_receive on the same method

Nick Hoffman nick at deadorange.com
Thu Sep 25 14:04:04 EDT 2008

On 2008-09-25, at 13:58, Tero Tilus wrote:
> 2008-09-25 13:47, Nick Hoffman:
>> I'm calling #stub! and #should_receive on the same method within a
>> class, and am finding that the method doesn't return the value given
>> to #stub!
> How about GMarker.should_receive(:new).with(foo).and_return  
> mock_marker

I knew there was a dead simple answer to the question. Thanks, Tero.  
Apologies for the brain fart.

More information about the rspec-users mailing list