Method: RSpec::Mocks::ExampleMethods#double
- Defined in:
- lib/rspec/mocks/example_methods.rb
#double ⇒ Mock #double(name) ⇒ Mock #double(stubs) ⇒ Mock #double(name, stubs) ⇒ Mock
Constructs an instance of RSpec::Mocks::Mock configured with an optional name, used for reporting in failure messages, and an optional hash of method/return-value pairs.
30 31 32 |
# File 'lib/rspec/mocks/example_methods.rb', line 30 def double(*args) declare_double('Double', *args) end |