Displaying 1 result from an estimated 1 matches for "test_should_return_values_in_order".
2006 Sep 22
2
foo.expects(:blah).returns(10).then(11) syntax
...made:
Index: test/mocha/expectation_test.rb
===================================================================
--- test/mocha/expectation_test.rb (revision 854)
+++ test/mocha/expectation_test.rb (working copy)
@@ -95,6 +95,12 @@
assert_equal 99, expectation.invoke
end
+ def test_should_return_values_in_order
+ expectation = Expectation.new(:expected_method).returns(9).then(10)
+ assert_equal 9, expectation.invoke
+ assert_equal 10, expectation.invoke
+ end
+
def test_should_return_nil_if_no_value_specified
expectation = Expectation.new(:expected_method)
assert_nil expectation....