module TestXml
Constants
- ASSERTIONS
- VERSION
Attributes
enable_placeholders[RW]
Public Class Methods
diff(expect, actual)
click to toggle source
# File lib/test_xml/assertions.rb, line 46 def self.diff(expect, actual) doc_actual = Nokogiri::XML.parse(actual, &:noblanks) doc_expect = Nokogiri::XML.parse(expect, &:noblanks) diff = Diffy::Diff.new(doc_expect.to_xml, doc_actual.to_xml, :context => 3, :include_diff_info => true).to_a return "" if diff.empty? # Skip diff headers, they're useless since they refer to tempfiles diff[2..-1].join("") end
placeholders_enabled?()
click to toggle source
# File lib/test_xml.rb, line 11 def placeholders_enabled? !!enable_placeholders end