[rspec-users] Deprecating the mocking framework?
Peter Marklund
peter_marklund at fastmail.fm
Mon Sep 3 05:41:08 EDT 2007
> 2) Chained stubs/expectations
>
> mock.stub!(:valid?).and_return(false)
> mock.stub!(:valid?).and_return(true).after_receiving
> (:save).and_return(true)
On first look, that last line is pretty hard to read. I think I
understand the intention now, but I'm not sure it harmonizes with the
"Clarity over Cleverness" motto.
Peter
More information about the rspec-users
mailing list