class Plyushkin::Test::HoardedAttributeMatcher::IgnoreUnchangedMatcher

Public Class Methods

new(attr_name) click to toggle source
# File lib/plyushkin/test/hoarded_attribute_matcher.rb, line 54
def initialize(attr_name)
  @attr_name = attr_name
end

Public Instance Methods

failure_message() click to toggle source
# File lib/plyushkin/test/hoarded_attribute_matcher.rb, line 62
def failure_message
  message(true)
end
match(subject) click to toggle source
# 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) click to toggle source
# File lib/plyushkin/test/hoarded_attribute_matcher.rb, line 70
def message(negate)
  "Plyushkin:: Hoarded attribute #{@attr_name} #{negate ? "ignores" : "does not ignore"} unchanged values"
end
negative_failure_message() click to toggle source
# File lib/plyushkin/test/hoarded_attribute_matcher.rb, line 66
def negative_failure_message
  message(false)
end