Method: RSpec::Mocks::ExampleMethods#expect_any_instance_of

Defined in:
lib/rspec/mocks/example_methods.rb

#expect_any_instance_ofObject

Note:

If you disable the :expect syntax this method will be undefined.

Used to wrap a class in preparation for setting a mock expectation on instances of it.

Examples:

expect_any_instance_of(MyClass).to receive(:foo)

# File 'lib/rspec/mocks/example_methods.rb', line 318