[DRE-commits] [SCM] ruby-nokogiri.git branch, master, updated. debian/1.5.2-1-30-ga0e58e6

Cédric Boutillier boutil at debian.org
Thu May 9 23:31:44 UTC 2013


The following commit has been merged in the master branch:
commit 87400fe4265df9d6015787f9e7056d2b90efa55f
Author: Cédric Boutillier <boutil at debian.org>
Date:   Fri May 10 00:59:49 2013 +0200

    add fix_tests_assert_match.patch to make tests pass with minitest gem

diff --git a/debian/patches/fix_tests_assert_match.patch b/debian/patches/fix_tests_assert_match.patch
new file mode 100644
index 0000000..31f7761
--- /dev/null
+++ b/debian/patches/fix_tests_assert_match.patch
@@ -0,0 +1,40 @@
+Description: fix assert_match tests to make them work with minitest gem
+ In assert_match of minitest gem, first parameter is converted to Regexp, and
+ the second is expected to be a String. Parameters have to be exchanged.
+Author: Cédric Boutillier <boutil at debian.org>
+Bug: https://github.com/sparklemotion/nokogiri/pull/900
+Last-Update: 2013-05-09
+
+--- a/test/xml/test_document.rb
++++ b/test/xml/test_document.rb
+@@ -47,7 +47,7 @@
+         root << txt
+         root << ent
+         d << root
+-        assert_match d.to_html, /’/
++        assert_match /’/, d.to_html
+       end
+ 
+       def test_document_with_initial_space
+--- a/test/xml/test_entity_reference.rb
++++ b/test/xml/test_entity_reference.rb
+@@ -26,7 +26,7 @@
+         doc = Nokogiri::XML xml
+         lf_node = Nokogiri::XML::EntityReference.new(doc, "#xa")
+         doc.xpath('/item').first.add_child(lf_node)
+-        assert_match doc.to_xml, /&#xa;/
++        assert_match /&#xa;/, doc.to_xml
+       end
+     end
+ 
+--- a/test/xml/test_node.rb
++++ b/test/xml/test_node.rb
+@@ -830,7 +830,7 @@
+         ne = d1.root.xpath('//a').first.dup(1)
+         ne.content += "& < & > \" &"
+         d2.root << ne
+-        assert_match d2.to_s, /<a>&& < & > " &<\/a>/
++        assert_match /<a>&& < & > " &<\/a>/, d2.to_s
+       end
+ 
+       def test_content_after_appending_text
diff --git a/debian/patches/series b/debian/patches/series
index 816b918..4ee3243 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 remove-annoying-warning.patch
 no-require-rubygems.patch
+fix_tests_assert_match.patch

-- 
ruby-nokogiri.git



More information about the Pkg-ruby-extras-commits mailing list