Class: Plyushkin::Test::HoardedAttributeMatcher::IgnoreUnchangedMatcher
- Inherits:
-
Object
- Object
- Plyushkin::Test::HoardedAttributeMatcher::IgnoreUnchangedMatcher
- Defined in:
- lib/plyushkin/test/hoarded_attribute_matcher.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(attr_name) ⇒ IgnoreUnchangedMatcher
constructor
A new instance of IgnoreUnchangedMatcher.
- #match(subject) ⇒ Object
- #message(negate) ⇒ Object
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(attr_name) ⇒ IgnoreUnchangedMatcher
Returns a new instance of IgnoreUnchangedMatcher.
54 55 56 |
# File 'lib/plyushkin/test/hoarded_attribute_matcher.rb', line 54 def initialize(attr_name) @attr_name = attr_name end |
Instance Method Details
#failure_message ⇒ Object
62 63 64 |
# File 'lib/plyushkin/test/hoarded_attribute_matcher.rb', line 62 def (true) end |
#match(subject) ⇒ Object
58 59 60 |
# File 'lib/plyushkin/test/hoarded_attribute_matcher.rb', line 58 def match(subject) subject.class.plyushkin_model.ignore_unchanged_values[@attr_name] end |
#message(negate) ⇒ Object
70 71 72 |
# File 'lib/plyushkin/test/hoarded_attribute_matcher.rb', line 70 def (negate) "Plyushkin:: Hoarded attribute #{@attr_name} #{negate ? "ignores" : "does not ignore"} unchanged values" end |
#negative_failure_message ⇒ Object
66 67 68 |
# File 'lib/plyushkin/test/hoarded_attribute_matcher.rb', line 66 def (false) end |