Class: Sequent::Core::Helpers::AttrMatchers::Equals

Inherits:
Struct
  • Object
show all
Defined in:
lib/sequent/core/helpers/attr_matchers/equals.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#expected_valueObject

Returns the value of attribute expected_value

Returns:

  • (Object)

    the current value of expected_value



7
8
9
# File 'lib/sequent/core/helpers/attr_matchers/equals.rb', line 7

def expected_value
  @expected_value
end

Instance Method Details

#matches_attr?(actual_value) ⇒ Boolean

Returns:



8
9
10
# File 'lib/sequent/core/helpers/attr_matchers/equals.rb', line 8

def matches_attr?(actual_value)
  actual_value == expected_value
end

#to_sObject



12
13
14
# File 'lib/sequent/core/helpers/attr_matchers/equals.rb', line 12

def to_s
  "eq(#{ArgumentSerializer.serialize_value(expected_value)})"
end