search for: calltwic

Displaying 1 result from an estimated 1 matches for "calltwic".

Did you mean: calltwice
2006 Dec 02
3
Scoping expectations and more ...
...rameters and return values. Someday I will have a blog where I can publish this example, for now I send it to the mailing list: # This is the object we will mock class A def m(p) return p+1 end end # This is teh object we will test class B def m(p) a = A.new a.m(p) end def calltwice(p) a = A.new a.m(p+1)+a.m(p+2) end end require ''test/unit'' require ''rubygems'' require ''mocha'' require ''stubba'' class BTest < Test::Unit::TestCase # This test demonstrates how you can call a function that cal...