method
assert_called_with
v8.0.0 -
Show latest stable
- Class:
ActiveSupport::Testing::MethodCallAssertions
assert_called_with(object, method_name, args, returns: false, **kwargs, &block)private
No documentation available.
# File activesupport/lib/active_support/testing/method_call_assertions.rb, line 20
def assert_called_with(object, method_name, args, returns: false, **kwargs, &block)
mock = Minitest::Mock.new
expect_called_with(mock, args, returns: returns, **kwargs)
object.stub(method_name, mock, &block)
assert_mock(mock)
end