def assert_received(mock, expected_method_name)
      matcher = have_received(expected_method_name)
      yield(matcher) if block_given?
      assert matcher.matches?(mock), matcher.failure_message
    end
def assert_received(mock, expected_method_name)
      matcher = have_received(expected_method_name)
      yield(matcher) if block_given?
      assert matcher.matches?(mock), matcher.failure_message
    end
Asserts that the given mock received the given method.

 Examples:

   assert_received(mock, :to_s)
   assert_received(Radio, :new) {|expect| expect.with(1041) }
   assert_received(radio, :volume) {|expect| expect.with(11).twice }