Class: RR::DoubleDefinitions::DoubleDefinition

Inherits:
Object
  • Object
show all
Includes:
ArgumentDefinitionConstructionMethods, DefinitionConstructionMethods, StateQueryMethods, TimesDefinitionConstructionMethods, Strategies::StrategyMethods, Space::Reader
Defined in:
lib/rr/double_definitions/double_definition.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ArgumentDefinitionConstructionMethods, DefinitionConstructionMethods, StateQueryMethods, TimesDefinitionConstructionMethods

Constant Summary

ORIGINAL_METHOD =
Object.new

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Strategies::StrategyMethods

#any_instance_of!, #dont_allow!, #instance_of!, #mock!, #proxy!, #strong!, #stub!

Methods included from StateQueryMethods

#exact_match?, #expected_arguments, #implementation_is_original_method?, #ordered?, #terminal?, #verbose?, #verify_method_signature?, #wildcard_match?

Methods included from DefinitionConstructionMethods

#after_call, #implemented_by, #implemented_by_original_method, #ordered, #returns, #verbose, #verify_method_signature, #yields

Methods included from TimesDefinitionConstructionMethods

#any_number_of_times, #at_least, #at_most, #never, #once, #times, #twice

Methods included from ArgumentDefinitionConstructionMethods

#with, #with_any_args, #with_no_args

Methods included from Space::Reader

#space

Constructor Details

- (DoubleDefinition) initialize(double_definition_create)

Returns a new instance of DoubleDefinition



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/rr/double_definitions/double_definition.rb', line 17

def initialize(double_definition_create)
  @implementation = nil
  @argument_expectation = nil
  @times_matcher = nil
  @after_call_proc = nil
  @yields_value = nil
  @double_definition_create = double_definition_create
  @ordered = false
  @verbose = false
  @verify_method_signature = false
end

Instance Attribute Details

- (Object) after_call_proc

Returns the value of attribute after_call_proc



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def after_call_proc
  @after_call_proc
end

- (Object) argument_expectation

Returns the value of attribute argument_expectation



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def argument_expectation
  @argument_expectation
end

- (Object) double

Returns the value of attribute double



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def double
  @double
end

- (Object) double_definition_create

Returns the value of attribute double_definition_create



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def double_definition_create
  @double_definition_create
end

- (Object) implementation

Returns the value of attribute implementation



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def implementation
  @implementation
end

- (Object) times_matcher

Returns the value of attribute times_matcher



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def times_matcher
  @times_matcher
end

- (Object) yields_value

Returns the value of attribute yields_value



5
6
7
# File 'lib/rr/double_definitions/double_definition.rb', line 5

def yields_value
  @yields_value
end

Instance Method Details

- (Object) any_instance_of(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



356
357
358
# File 'lib/rr/double_definitions/double_definition.rb', line 356

def any_instance_of(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).any_instance_of(subject, method_name, &definition_eval_block)
end

- (Object) dont_allow(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



344
345
346
# File 'lib/rr/double_definitions/double_definition.rb', line 344

def dont_allow(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).dont_allow(subject, method_name, &definition_eval_block)
end

- (Object) instance_of(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



360
361
362
# File 'lib/rr/double_definitions/double_definition.rb', line 360

def instance_of(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).instance_of(subject, method_name, &definition_eval_block)
end

- (Object) mock(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



336
337
338
# File 'lib/rr/double_definitions/double_definition.rb', line 336

def mock(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).mock(subject, method_name, &definition_eval_block)
end

- (Object) proxy(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



348
349
350
# File 'lib/rr/double_definitions/double_definition.rb', line 348

def proxy(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).proxy(subject, method_name, &definition_eval_block)
end

- (Object) root_subject



33
34
35
# File 'lib/rr/double_definitions/double_definition.rb', line 33

def root_subject
  double_definition_create.root_subject
end

- (Object) strong(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



352
353
354
# File 'lib/rr/double_definitions/double_definition.rb', line 352

def strong(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).strong(subject, method_name, &definition_eval_block)
end

- (Object) stub(subject = DoubleDefinitionCreate::NO_SUBJECT, method_name = nil, &definition_eval_block)



340
341
342
# File 'lib/rr/double_definitions/double_definition.rb', line 340

def stub(subject=DoubleDefinitionCreate::NO_SUBJECT, method_name=nil, &definition_eval_block)
  ChildDoubleDefinitionCreate.new(self).stub(subject, method_name, &definition_eval_block)
end

- (Object) subject



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

def subject
  double_definition_create.subject
end