Displaying 1 result from an estimated 1 matches for "test_should_yield_with_block_result".
2006 Sep 29
1
yielding consecutive values
...st/mocha/expectation_test.rb
===================================================================
--- test/mocha/expectation_test.rb (revision 62)
+++ test/mocha/expectation_test.rb (working copy)
@@ -91,6 +91,11 @@
assert_equal parameters_for_yield, 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...