Class: MuckEngine::Models::Matchers::SanitizeMatcher

Inherits:
MuckMatcherBase show all
Defined in:
lib/muck-engine/test/models/matchers/sanitize_matcher.rb

Overview

:nodoc:

Instance Method Summary collapse

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

#descriptionObject



25
26
27
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 25

def description
  "sanitizes attribute"
end

#failure_messageObject



21
22
23
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 21

def failure_message
  "#{factory_name} does not correctly sanitize the attribute #{@attribute}"
end

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/muck-engine/test/models/matchers/sanitize_matcher.rb', line 16

def matches?(subject)
  @subject = subject
  sanitizes?
end