search for: method_sym

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

2006 Oct 10
0
Is anybody using a block to verify arguments passed to an expectation?
...s end If possible, I''d like to remove/rename this functionality. Instead, I''d like to be able to set an expectation that checks for specified arguments _and_ a block. A simple illustration would be with a method that delegates directly to another object. def delegate(delegate, method_sym, *args, &blk) delegate.__send__(method_sym, *args, &blk) end I''d like to have the following test that ensures I am correctly passing all arguments to my delegate object. def test_should_delegate method_sym = :foo args = [1, 2] blk = lambda {} mock_delegate = mock mock_dele...