[rspec-users] newbie: how to preserve NoMethodError under stubbing?

Ashley Moran ashley.moran at patchspace.co.uk
Sat Jul 24 13:08:19 EDT 2010


On 24 Jul 2010, at 2:52 PM, Wincent Colaiuta wrote:

> How about this:
> 
>  f.stub.existing(:bar)
> 
> That's probably RR influencing me there, which employs things like "stub.proxy" and so on. So maybe not such a good idea for rspec-mocks.

Another option might be to deprecate #stub! as an alias for #stub and then bring it back as an equivalent to `stub.existing` above.

Ash

-- 
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran





More information about the rspec-users mailing list