Displaying 1 result from an estimated 1 matches for "expected_v".
Did you mean:
expected_
2006 Sep 29
1
yielding consecutive values
...roc) ? element.call : element
+ end
+ yield(*params)
+ end
@return_value.is_a?(Proc) ? @return_value.call : @return_value
end
This test passes also, but I didn''t think it was necessary for the
suite...
def test_should_yield_with_block_result_1123
expected_vals = [1,2,3]
expectation = new_expectation.yields( lambda
{ expected_vals.shift }, 4 )
expectation.invoke() { |*parameters| assert_equal [1, 4],
parameters }
expectation.invoke() { |*parameters| assert_equal [2, 4],
parameters }
expectation.invoke() { |*parameters| assert_...