module RR::DoubleDefinitions::DoubleDefinition::StateQueryMethods
Public Instance Methods
Source
# File lib/rr/double_definitions/double_definition.rb, line 312 def exact_match?(arguments, keyword_arguments) unless @argument_expectation raise RR::Errors.build_error(:DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") end @argument_expectation.exact_match?(arguments, keyword_arguments) end
Source
# File lib/rr/double_definitions/double_definition.rb, line 333 def expected_arguments if argument_expectation argument_expectation.expected_arguments else [] end end
Source
# File lib/rr/double_definitions/double_definition.rb, line 341 def expected_keyword_arguments if argument_expectation argument_expectation.expected_keyword_arguments else {} end end
Source
# File lib/rr/double_definitions/double_definition.rb, line 349 def implementation_is_original_method? implementation_strategy.is_a?(Strategies::Implementation::Proxy) end
Source
# File lib/rr/double_definitions/double_definition.rb, line 302 def ordered? @ordered end
Double#ordered?
returns true when the Double
is ordered.
mock(subject).method_name.ordered?
Source
# File lib/rr/double_definitions/double_definition.rb, line 326 def terminal? unless @times_matcher raise RR::Errors.build_error(:DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") end @times_matcher.terminal? end
Source
# File lib/rr/double_definitions/double_definition.rb, line 308 def verbose? @verbose ? true : false end
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.
Source
# File lib/rr/double_definitions/double_definition.rb, line 353 def verify_method_signature? !!@verify_method_signature end
Also aliased as: strong?
Source
# File lib/rr/double_definitions/double_definition.rb, line 319 def wildcard_match?(arguments, keyword_arguments) unless @argument_expectation raise RR::Errors.build_error(:DoubleDefinitionError, "#argument_expectation must be defined on #{inspect}") end @argument_expectation.wildcard_match?(arguments, keyword_arguments) end
Protected Instance Methods
Source
# File lib/rr/double_definitions/double_definition.rb, line 359 def implementation_strategy double_definition_create.implementation_strategy end