search for: test_should_return_specified_valu

Displaying 2 results from an estimated 2 matches for "test_should_return_specified_valu".

2006 Sep 29
1
yielding consecutive values
...yielded_parameters end + def test_should_yield_with_block_result + expectation = new_expectation.yields( lambda { ''lambda return value'' } ) + expectation.invoke() { |*parameters| assert_equal [''lambda return value''], parameters } + end + def test_should_return_specified_value expectation = new_expectation.returns(99) assert_equal 99, expectation.invoke Index: lib/mocha/expectation.rb =================================================================== --- lib/mocha/expectation.rb (revision 62) +++ lib/mocha/expectation.rb (working copy) @@ -217,7 +217,...
2006 Sep 29
2
multiyield
...+ def test_should_yield_multiple_times_with_multiyield + expectation = new_expectation.multiyield(:foo, 1, ''bar'') + actual = [] + expectation.invoke() { |parameter| actual << parameter } + assert_equal [:foo, 1, ''bar''], actual + end + def test_should_return_specified_value expectation = new_expectation.returns(99) assert_equal 99, expectation.invoke Index: lib/mocha/expectation.rb =================================================================== --- lib/mocha/expectation.rb (revision 62) +++ lib/mocha/expectation.rb (working copy) @@ -26,6 +26,10...