Class: RSpec::Contracts::Double

Inherits:
Object
  • Object
show all
Includes:
Mocks::TestDouble
Defined in:
lib/rspec/contracts/double.rb

Instance Method Summary collapse

Constructor Details

#initialize(interface_name, *args) ⇒ Double

Returns a new instance of Double.



10
11
12
13
# File 'lib/rspec/contracts/double.rb', line 10

def initialize(interface_name, *args)
  @interface = Interface.find_or_create interface_name
  super
end

Instance Method Details

#__build_mock_proxy(order_group) ⇒ Object



15
16
17
# File 'lib/rspec/contracts/double.rb', line 15

def __build_mock_proxy(order_group)
  MockProxy.new self, order_group, @interface
end