This repository has been archived by the owner on Oct 27, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add warning about change in behaviour of stub/mock combinations [#644…
… state:wontfix]
- Loading branch information
124c00d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are your thoughts on something like a ‘should_have_received’ expectation? This would be akin to the not_a_mock plugin (see notahat/not_a_mock on github)
124c00d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adzap, we have discussed bringing the test spy pattern to rspec on the mailing list a couple of times. I think Pat was even implementing it. However, once it was brought up that the functionality already existed in the form of the plugin that you mentioned most effort on it ceased. If you still think it should be part of rspec proper, then I would recommend bringing it up again on the rspec mailing list or submitting a lighthouse ticket.
124c00d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bmabey, very interesting. I do prefer that pattern for message expectations so I think it worth investigating. The plugin has some draw backs to it so integrating into rspec proper would be best.
Will have a look at the rspec code and have a go at a patch.
124c00d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a side note the RR mocking framework which can be used with Rspec supports test spies.
http://github.com/btakita/rr/tree/master