Reputation: 2705
Given this,
class SomeController < AbstractDocumentsController
def create
foo_method(params)
bar_method
end
end
How can I test foo_method
and bar_method
is called when create
action is invoked?
Upvotes: 0
Views: 60
Reputation: 81
I think you should use mocks for this. Example with rspec-mocks Github docs
For you code sample you can use something like this, I think expect_any_instance_of(SomeController).to receive(:foo_method)
Upvotes: 1