module RR::DoubleDefinitions::DoubleDefinition::StateQueryMethods
Public Instance Methods
exact_match?(*arguments)
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 301 def exact_match?(*arguments) raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @argument_expectation @argument_expectation.exact_match?(*arguments) end
expected_arguments()
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 316 def expected_arguments argument_expectation ? argument_expectation.expected_arguments : [] end
implementation_is_original_method?()
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 320 def implementation_is_original_method? implementation_strategy.is_a?(Strategies::Implementation::Proxy) end
ordered?()
click to toggle source
Object#ordered? returns true when the Double is ordered.
mock(subject).method_name.ordered?
# File lib/rr/double_definitions/double_definition.rb, line 291 def ordered? @ordered end
terminal?()
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 311 def terminal? raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @times_matcher @times_matcher.terminal? end
verbose?()
click to toggle source
Object#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.
# File lib/rr/double_definitions/double_definition.rb, line 297 def verbose? @verbose ? true : false end
verify_method_signature?()
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 324 def verify_method_signature? !!@verify_method_signature end
Also aliased as: strong?
wildcard_match?(*arguments)
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 306 def wildcard_match?(*arguments) raise(Errors::DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") unless @argument_expectation @argument_expectation.wildcard_match?(*arguments) end
Protected Instance Methods
implementation_strategy()
click to toggle source
# File lib/rr/double_definitions/double_definition.rb, line 330 def implementation_strategy double_definition_create.implementation_strategy end