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

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

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
@ -193,10 +193,11 @@ class LibxmlEngineTest < ActiveSupport::TestCase
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
end
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
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
@ -184,10 +184,11 @@ class LibXMLSAXEngineTest < ActiveSupport::TestCase
end
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
end
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
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
@ -206,10 +206,11 @@ class NokogiriEngineTest < ActiveSupport::TestCase
end
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
end
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
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
@ -207,10 +207,11 @@ class NokogiriSAXEngineTest < ActiveSupport::TestCase
end
private
def assert_equal_rexml(xml)
hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) }
assert_equal(hash, XmlMini.parse(xml))
end
def assert_equal_rexml(xml)
parsed_xml = XmlMini.parse(xml)
hash = XmlMini.with_backend('REXML') { parsed_xml }
assert_equal(hash, parsed_xml)
end
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