Class: EimXML::Matchers::HaveContent
- Inherits:
-
Object
- Object
- EimXML::Matchers::HaveContent
- Defined in:
- lib/eim_xml/matcher.rb
Instance Method Summary collapse
- #failure_message ⇒ Object
-
#initialize(expected) ⇒ HaveContent
constructor
A new instance of HaveContent.
- #matches?(target) ⇒ Boolean
- #negative_failure_message ⇒ Object
Constructor Details
#initialize(expected) ⇒ HaveContent
Returns a new instance of HaveContent.
6 7 8 |
# File 'lib/eim_xml/matcher.rb', line 6 def initialize(expected) @expected = expected end |
Instance Method Details
#failure_message ⇒ Object
15 16 17 |
# File 'lib/eim_xml/matcher.rb', line 15 def "expected #{@target.inspect} must have #{@expected}, but not." end |
#matches?(target) ⇒ Boolean
10 11 12 13 |
# File 'lib/eim_xml/matcher.rb', line 10 def matches?(target) @target = target @target.has?(@expected) end |
#negative_failure_message ⇒ Object
19 20 21 |
# File 'lib/eim_xml/matcher.rb', line 19 def "expected #{@target.inspect} must not have #{@expected}, but has." end |