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