class EimXML::Matchers::HaveContent

Public Class Methods

new(expected) click to toggle source
  # File lib/eim_xml/matcher.rb
4 def initialize(expected)
5         @expected = expected
6 end

Public Instance Methods

failure_message() click to toggle source
   # File lib/eim_xml/matcher.rb
13 def failure_message
14         "expected #{@target.inspect} must have #{@expected}, but not."
15 end
matches?(target) click to toggle source
   # File lib/eim_xml/matcher.rb
 8 def matches?(target)
 9         @target = target
10         @target.has?(@expected)
11 end
negative_failure_message() click to toggle source
   # File lib/eim_xml/matcher.rb
17 def negative_failure_message
18         "expected #{@target.inspect} must not have #{@expected}, but has."
19 end