This method is deprecated or moved on the latest stable version.
The last existing version (v2_1_10) is shown here.
verify()
public
Verify that all methods were called as expected. Raises MockExpectationError if the mock
object was not called as expected.
# File lib/minitest/mock.rb, line 81
def verify
@expected_calls.each do |name, calls|
calls.each do |expected|
msg1 = "expected #{__call name, expected}"
msg2 = "#{msg1}, got [#{__call name, @actual_calls[name]}]"
raise MockExpectationError, msg2 if
@actual_calls.has_key?(name) and
not @actual_calls[name].include?(expected)
raise MockExpectationError, msg1 unless
@actual_calls.has_key?(name) and
@actual_calls[name].include?(expected)
end
end
true
end