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.
4 5 6 |
# File 'lib/eim_xml/matcher.rb', line 4 def initialize(expected) @expected = expected end |
Instance Method Details
#failure_message ⇒ Object
13 14 15 |
# File 'lib/eim_xml/matcher.rb', line 13 def "expected #{@target.inspect} must have #{@expected}, but not." end |
#matches?(target) ⇒ Boolean
8 9 10 11 |
# File 'lib/eim_xml/matcher.rb', line 8 def matches?(target) @target = target @target.has?(@expected) end |
#negative_failure_message ⇒ Object
17 18 19 |
# File 'lib/eim_xml/matcher.rb', line 17 def "expected #{@target.inspect} must not have #{@expected}, but has." end |