class Plyushkin::Test::PersistedAttributeMatcher::WithFormatMatcher
Public Class Methods
new(attr_name, formatter)
click to toggle source
# File lib/plyushkin/test/persisted_attribute_matcher.rb, line 19 def initialize(attr_name, formatter) @attr_name, @formatter = attr_name, formatter end
Public Instance Methods
failure_message()
click to toggle source
# File lib/plyushkin/test/persisted_attribute_matcher.rb, line 27 def failure_message "Plyushkin: attribute #{@attr_name} is not formatting with #{@formatter}" end
match(subject)
click to toggle source
# File lib/plyushkin/test/persisted_attribute_matcher.rb, line 23 def match(subject) subject.class.formatters[@attr_name] == @formatter end
negative_failure_message()
click to toggle source
# File lib/plyushkin/test/persisted_attribute_matcher.rb, line 31 def negative_failure_message "Plyushkin: attribute #{@attr_name} is formatting with #{@formatter}" end