method

assert_called_with

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: MethodCallAssertions
assert_called_with(object, method_name, args, returns: false, **kwargs, &block) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.