[rspec-users] Stub that returns hash values
Ashley Moran
ashley.moran at patchspace.co.uk
Wed Oct 21 04:04:26 EDT 2009
On 21 Oct 2009, at 08:41, Pat Maddox wrote:
> wait why do you want to do this?? Just use a regular hash and do
> state-based assertions on it. Or determine the role that this
> hash-like thing is doing, and use a mock to define a proper interface.
> Ashley's solution works but I am very skeptical that the approach is
> a good one. Can you post some code?
I had wondered the same thing myself... but I figured if my suspicions
were right, a fallout problem would be posted soon enough :)
Ashley
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/
More information about the rspec-users
mailing list