Class Expectations::XmlString
In: lib/expectations/xml_string.rb
Parent: String

Methods

Public Instance methods

[Source]

   # File lib/expectations/xml_string.rb, line 3
3:   def expectations_equal_to(other)
4:     not Regexp.new(Regexp.escape(normalize(self))).match(normalize(other)).nil?
5:   end

[Source]

   # File lib/expectations/xml_string.rb, line 7
7:   def inspect
8:     "[as xml] #{normalize(self)}"
9:   end

Protected Instance methods

[Source]

    # File lib/expectations/xml_string.rb, line 13
13:   def normalize(xml_string)
14:     xml_string.strip.gsub(/>\s*</, "><")
15:   end

[Validate]