[mocha-developer] Fwd: [ mocha-Bugs-12001 ] Method call count is not reported correctly on error

James Mead jamesmead44 at gmail.com
Wed Jul 4 14:45:53 EDT 2007


---------- 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


More information about the mocha-developer mailing list