Displaying 1 result from an estimated 1 matches for "test_m_call".
Did you mean:
  test_call
  
2006 Dec 02
3
Scoping expectations and more ...
...;'test/unit''
require ''rubygems''
require ''mocha''
require ''stubba''
class BTest < Test::Unit::TestCase
  # This test demonstrates how you can call a function that calls a mocked
  # object more than one time in the same test
  def test_m_call
    b = B.new
    begin
      A.any_instance.expects(:m).with(5).returns(6)
      assert_equal 6, b.m(5)
    end
    begin
      A.any_instance.expects(:m).with(9).returns(10)
      assert_equal 10, b.m(9)
    end
  end
  # This test demonstrates how to mock objects where the method is called
  #...