Displaying 1 result from an estimated 1 matches for "mocha_verify".
2007 Jul 26
5
Test errors without verification
...his is by design, but I''ve stumbled across this a
few times trying to debug my own tests. If an assertion fails the
test, and a mock expectation was to blame, the test''s failure / error
messages don''t give enough info. I''ve had to resort to
def teardown
mocha_verify
end
which just gets tedious.
I''ve created a patch against trunk v164 and included it below.
Example:
def test_something
mock = mock("some mock")
mock.expects(:message)
flunk # or fail
end
I''m expecting to get both the flunk / fail message AND the Moch...