1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Added missing assert

This commit is contained in:
Anupam Choudhury 2013-04-02 11:50:25 +05:30
parent 98b52826fe
commit ae984cb1ef
6 changed files with 37 additions and 25 deletions

View file

@ -177,8 +177,9 @@ if RUBY_PLATFORM =~ /java/
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end

View file

@ -141,7 +141,7 @@ class LibxmlEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
XmlMini.parse(io)
assert_equal_rexml(io)
end
def test_children_with_simple_cdata
@ -194,8 +194,9 @@ class LibxmlEngineTest < ActiveSupport::TestCase
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end

View file

@ -141,7 +141,7 @@ class LibXMLSAXEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
XmlMini.parse(io)
assert_equal_rexml(io)
end
def test_children_with_simple_cdata
@ -185,8 +185,9 @@ class LibXMLSAXEngineTest < ActiveSupport::TestCase
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end

View file

@ -155,7 +155,7 @@ class NokogiriEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
XmlMini.parse(io)
assert_equal_rexml(io)
end
def test_children_with_simple_cdata
@ -207,8 +207,9 @@ class NokogiriEngineTest < ActiveSupport::TestCase
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end

View file

@ -156,7 +156,7 @@ class NokogiriSAXEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
XmlMini.parse(io)
assert_equal_rexml(io)
end
def test_children_with_simple_cdata
@ -208,8 +208,9 @@ class NokogiriSAXEngineTest < ActiveSupport::TestCase
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end

View file

@ -24,6 +24,13 @@ class REXMLEngineTest < ActiveSupport::TestCase
morning
</root>
eoxml
XmlMini.parse(io)
assert_equal_rexml(io)
end
private
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
end