Как утверждать, что определенный метод вызывается с Ruby Minitest Framework?

Я хочу проверить, правильно ли функция вызывает другие функции с помощью minitest Ruby, но я не могу найти подходящийassert проверить издоктор.

The source code
class SomeClass
  def invoke_function(name)
    name == "right" ? right () : wrong ()
  end

  def right
    #...
  end

  def wrong
    #...
  end
end
The test code:
describe SomeClass do
  it "should invoke right function" do
    # assert right() is called
  end

  it "should invoke other function" do
    # assert wrong() is called
  end
end

Ответы на вопрос(3)

Ваш ответ на вопрос