[rspec-devel] If you set an expectation on something that's already stubbed, should it return the stubbed value?
pergesu at gmail.com
Tue Sep 16 21:23:11 EDT 2008
> Hey Pat - looks like message expectations that inherit (for lack of a
> better term) the return value from a previously defined stub ignore
> the block, expected_from, and any subsequent arguments passed to the
> message expectation. Can you add examples for those and make sure they
> pass before committing this. I added one for blocks (which fails) to
> get you started - patch attached.
Took care of the blocks and expected_from... I'm not sure what you
mean by "any subsequent arguments passed to the message expectation
though" ? My best guess is that you're talking about the options
To tell you the truth, I've never used it before :) I figured the
best way to test this was to look at the options_hash_spec (since that
seems like the only place where it's really used?). But what I found
is that those examples seem to be broken...I changed the spec around
to make it clearly fail, but it still passed. I've attached a patch
that shows it (apply it with "git apply"). Do you have any idea
what's going on?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 642 bytes
Desc: not available
More information about the rspec-devel