Class: ConvenientService::RSpec::PrimitiveMatchers::Classes::DelegateTo::Entities::SubMatchers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matcher: ) ⇒ void #initialize(matcher: , block_expectation_value: ) ⇒ void

Returns a new instance of Base.

Overloads:



34
35
36
37
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 34

def initialize(matcher:, block_expectation_value: nil)
  @matcher = matcher
  @block_expectation_value = block_expectation_value
end

Instance Attribute Details

#block_expectation_valueObject (readonly)

Returns the value of attribute block_expectation_value.



15
16
17
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 15

def block_expectation_value
  @block_expectation_value
end

#matcherObject (readonly)

Returns the value of attribute matcher.



21
22
23
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 21

def matcher
  @matcher
end

Instance Method Details

#apply_stubs!void

This method returns an undefined value.



42
43
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 42

def apply_stubs!
end

#does_not_match?(block_expectation_value) ⇒ Boolean

Parameters:

  • block_expectation_value (Object)

    Can be any type.

Returns:

  • (Boolean)


59
60
61
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 59

def does_not_match?(block_expectation_value)
  !matches?(block_expectation_value)
end

#failure_messageString

Returns:

  • (String)


66
67
68
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 66

def failure_message
  ""
end

#failure_message_when_negatedString

Returns:

  • (String)


73
74
75
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 73

def failure_message_when_negated
  ""
end

#matches?(block_expectation_value) ⇒ Boolean

Parameters:

  • block_expectation_value (Object)

    Can be any type.

Returns:

  • (Boolean)


49
50
51
52
53
# File 'lib/convenient_service/rspec/primitive_matchers/classes/delegate_to/entities/sub_matchers/base.rb', line 49

def matches?(block_expectation_value)
  @block_expectation_value = block_expectation_value

  false
end