James Mead
2007-Jul-04 18:45 UTC
[mocha-developer] Fwd: [ mocha-Bugs-12001 ] Method call count is not reported correctly on error
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 04-Jul-2007 19:21 Subject: [ mocha-Bugs-12001 ] Method call count is not reported correctly on error To: noreply at rubyforge.org Bugs item #12001, was opened at 2007-07-04 15:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7477&aid=12001&group_id=1917 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Romulo A. Ceccon (romuloceccon) Assigned to: Nobody (None) Summary: Method call count is not reported correctly on error Initial Comment: Given a file containing the following: require ''test/unit'' require ''mocha'' class TestMocha < Test::Unit::TestCase def test_expectation_count m = mock m.expects(:test) m.test m.test # fails end end mocha fails on the second call to ''m.test'' with the message: #<Mock:0x2e7c280>.test() - expected calls: 0, actual calls: 1 Similar expectations: test I would expect mocha to say "expected calls: 1, actual calls: 2", though. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7477&aid=12001&group_id=1917 -- James. http://blog.floehopper.org
Apparently Analagous Threads
- Fwd: [ mocha-Bugs-16523 ] Ruby 1.9 gives warning
- Fwd: [ mocha-Bugs-8687 ] Block''s return value is dropped on stubbed yielding methods.
- Fwd: [ mocha-Bugs-11885 ] never doesn''t work with stub_everything
- Fwd: [ mocha-Bugs-6416 ] Mock objects shouldn''t define #to_s
- Fwd: [ mocha-Bugs-5892 ] Using a setup method in test_case_class destroys subsequent test cases