Module: RSpec::Mocks::AnyInstance
- Defined in:
- lib/rspec/mocks/any_instance.rb,
lib/rspec/mocks/any_instance/chain.rb,
lib/rspec/mocks/any_instance/recorder.rb,
lib/rspec/mocks/any_instance/stub_chain.rb,
lib/rspec/mocks/any_instance/message_chains.rb,
lib/rspec/mocks/any_instance/stub_chain_chain.rb,
lib/rspec/mocks/any_instance/expectation_chain.rb
Defined Under Namespace
Classes: Chain, ExpectationChain, NegativeExpectationChain, PositiveExpectationChain, Recorder
Instance Method Summary collapse
-
#any_instance ⇒ Recorder
Used to set stubs and message expectations on any instance of a given class.
Instance Method Details
#any_instance ⇒ Recorder
Used to set stubs and message expectations on any instance of a given
class. Returns a Recorder, which records messages like
stub and should_receive for later playback on instances of the
class.
28 29 30 31 32 |
# File 'lib/rspec/mocks/any_instance.rb', line 28 def any_instance RSpec::Mocks::space.add(self) modify_dup_to_remove_mock_proxy_when_invoked __recorder end |