Class: MuckEngine::Models::Matchers::SanitizeMatcher
- Inherits:
-
MuckMatcherBase
- Object
- MuckMatcherBase
- MuckEngine::Models::Matchers::SanitizeMatcher
- Defined in:
- lib/muck-engine/test/models/matchers/sanitize_matcher.rb
Overview
:nodoc:
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
-
#initialize(attribute) ⇒ SanitizeMatcher
constructor
A new instance of SanitizeMatcher.
- #matches?(subject) ⇒ Boolean
Constructor Details
#initialize(attribute) ⇒ SanitizeMatcher
Returns a new instance of SanitizeMatcher.
12 13 14 |
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 12 def initialize(attribute) @attribute = attribute end |
Instance Method Details
#description ⇒ Object
25 26 27 |
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 25 def description "sanitizes attribute" end |
#failure_message ⇒ Object
21 22 23 |
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 21 def "#{factory_name} does not correctly sanitize the attribute #{@attribute}" end |
#matches?(subject) ⇒ Boolean
16 17 18 19 |
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 16 def matches?(subject) @subject = subject sanitizes? end |