Module | RSpec::Mocks::TestDouble |
In: |
lib/rspec/mocks/test_double.rb
|
Implements the methods needed for a pure test double. RSpec::Mocks::Mock includes this module, and it is provided for cases where you want a pure test double without subclassing RSpec::Mocks::Mock.
Extends the TestDouble module onto the given object and initializes it as a test double.
@example
module = Module.new RSpec::Mocks::TestDouble.extend_onto(module, "MyMixin", :foo => "bar") module.foo #=> "bar"
Creates a new test double with a `name` (that will be used in error messages only)