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

Tero Tilus tero at tilus.net
Thu Sep 25 13:58:57 EDT 2008


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

-- 
Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/


More information about the rspec-users mailing list