Module: RR::DoubleDefinitions::Strategies::StrategyMethods

Included in:
Adapters::RRMethods, DoubleDefinition, DoubleDefinitionCreate
Defined in:
lib/rr/double_definitions/strategies/strategy_methods.rb

Instance Method Summary collapse

Instance Method Details

#any_instance_of!(method_name = nil, &definition_eval_block) ⇒ Object



39
40
41
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 39

def any_instance_of!(method_name=nil, &definition_eval_block)
  any_instance_of(Object.new, method_name, &definition_eval_block)
end

#dont_allow!(method_name = nil, &definition_eval_block) ⇒ Object



23
24
25
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 23

def dont_allow!(method_name=nil, &definition_eval_block)
  dont_allow(Object.new, method_name, &definition_eval_block)
end

#instance_of!(method_name = nil, &definition_eval_block) ⇒ Object



43
44
45
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 43

def instance_of!(method_name=nil, &definition_eval_block)
  instance_of(Object.new, method_name, &definition_eval_block)
end

#mock!(method_name = nil, &definition_eval_block) ⇒ Object



15
16
17
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 15

def mock!(method_name=nil, &definition_eval_block)
  mock(Object.new, method_name, &definition_eval_block)
end

#proxy!(method_name = nil, &definition_eval_block) ⇒ Object



29
30
31
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 29

def proxy!(method_name=nil, &definition_eval_block)
  proxy(Object.new, method_name, &definition_eval_block)
end

#strong!(method_name = nil, &definition_eval_block) ⇒ Object



35
36
37
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 35

def strong!(method_name=nil, &definition_eval_block)
  strong(Object.new, method_name, &definition_eval_block)
end

#stub!(method_name = nil, &definition_eval_block) ⇒ Object



19
20
21
# File 'lib/rr/double_definitions/strategies/strategy_methods.rb', line 19

def stub!(method_name=nil, &definition_eval_block)
  stub(Object.new, method_name, &definition_eval_block)
end