lib/sablon/test/assertions.rb
def diff_docx_files(expected_path, actual_path)
            expected = parse_docx(expected_path)
            actual = parse_docx(actual_path)
            xml_diffs = {}
            #
            expected.each do |entry_name, expect|
              next unless entry_name =~ /.xml$|.rels$/
              next unless expect != actual[entry_name]
              #
              xml_diffs[entry_name] = diff(expect, actual[entry_name])
            end
            #
            xml_diffs
          end
# Returns a hash of all XML files that differ in the docx file. This
# only checks files that have the extension ".xml" or ".rels".
Returns a hash of all XML files that differ in the docx file. This
only checks files that have the extension ".xml" or ".rels".
Returns a hash of all XML files that differ in the docx file . This only checks files that have the extension " . xml " or " . rels " .
def diff_docx_files(expected_path, actual_path)
            expected = parse_docx(expected_path)
            actual = parse_docx(actual_path)
            xml_diffs = {}
            expected.each do |entry_name, expect|
              next unless entry_name =~ /.xml$|.rels$/
              next unless expect != actual[entry_name]
              xml_diffs[entry_name] = diff(expect, actual[entry_name])
            end
            xml_diffs
          end
def diff_docx_files ( expected_path , actual_path ) expected = parse_docx ( expected_path ) actual = parse_docx ( actual_path ) xml_diffs = { } expected . each do | entry_name , expect | next unless entry_name =~ / .xml$|.rels$ / next unless expect != actual [ entry_name ] xml_diffs [ entry_name ] = diff ( expect , actual [ entry_name ] ) end xml_diffs end
Returns a hash of all XML files that differ in the docx file.
Returns a hash of all XML files that differ in the docx file .
# # #
expected_path
actual_path