method
stub_any_instance
v5.1.7 -
Show latest stable
- Class:
ActiveSupport::Testing::MethodCallAssertions
stub_any_instance(klass, instance: klass.new)private
No documentation available.
# File activesupport/lib/active_support/testing/method_call_assertions.rb, line 36
def stub_any_instance(klass, instance: klass.new)
klass.stub(:new, instance) { yield instance }
end