Created
February 27, 2012 21:16
-
-
Save ream88/1927161 to your computer and use it in GitHub Desktop.
Mock :verify: method with MiniTest::Mock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MiniTest::Mock | |
| alias_method :__verify, :verify | |
| undef :verify | |
| end | |
| mock = MiniTest::Mock.new | |
| # call :verify on mock object | |
| # ... | |
| # Verify mocked calls | |
| mock.__verify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment