Class: FormObjectModel::FormObjectHaveValueMatcher
- Inherits:
-
Struct
- Object
- Struct
- FormObjectModel::FormObjectHaveValueMatcher
- Defined in:
- lib/form_object_model/matcher.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
3 4 5 |
# File 'lib/form_object_model/matcher.rb', line 3 def actual @actual end |
#value ⇒ Object
Returns the value of attribute value
2 3 4 |
# File 'lib/form_object_model/matcher.rb', line 2 def value @value end |
Instance Method Details
#failure_message_for_should ⇒ Object
10 11 12 |
# File 'lib/form_object_model/matcher.rb', line 10 def "Expected field '#{actual.locator}' to have value '#{value}' but had '#{actual.value}'" end |
#matches?(actual) ⇒ Boolean
5 6 7 8 |
# File 'lib/form_object_model/matcher.rb', line 5 def matches?(actual) @actual = actual actual.has_value?(value) end |