Module: RR::DoubleDefinitions::DoubleDefinition::StateQueryMethods

Included in:
RR::DoubleDefinitions::DoubleDefinition
Defined in:
lib/rr/double_definitions/double_definition.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) exact_match?(*arguments)



300
301
302
303
# File 'lib/rr/double_definitions/double_definition.rb', line 300

def exact_match?(*arguments)
  raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @argument_expectation
  @argument_expectation.exact_match?(*arguments)
end

- (Object) expected_arguments



315
316
317
# File 'lib/rr/double_definitions/double_definition.rb', line 315

def expected_arguments
  argument_expectation ? argument_expectation.expected_arguments : []
end

- (Boolean) implementation_is_original_method?



319
320
321
# File 'lib/rr/double_definitions/double_definition.rb', line 319

def implementation_is_original_method?
  implementation_strategy.is_a?(Strategies::Implementation::Proxy)
end

- (Boolean) ordered?

Double#ordered? returns true when the Double is ordered.

mock(subject).method_name.ordered?


290
291
292
# File 'lib/rr/double_definitions/double_definition.rb', line 290

def ordered?
  @ordered
end

- (Boolean) terminal?



310
311
312
313
# File 'lib/rr/double_definitions/double_definition.rb', line 310

def terminal?
  raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @times_matcher
  @times_matcher.terminal?
end

- (Boolean) verbose?

Double#verbose? returns true when verbose has been called on it. It returns true when the double is set to print each method call it receives.



296
297
298
# File 'lib/rr/double_definitions/double_definition.rb', line 296

def verbose?
  @verbose ? true : false
end

- (Boolean) verify_method_signature? Also known as: strong?



323
324
325
# File 'lib/rr/double_definitions/double_definition.rb', line 323

def verify_method_signature?
  !!@verify_method_signature
end

- (Boolean) wildcard_match?(*arguments)



305
306
307
308
# File 'lib/rr/double_definitions/double_definition.rb', line 305

def wildcard_match?(*arguments)
  raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @argument_expectation
  @argument_expectation.wildcard_match?(*arguments)
end