diff options
author | Brian Lopez <seniorlopez@gmail.com> | 2009-05-17 10:37:30 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-17 10:37:52 -0500 |
commit | 53dda29f8b34073a4b135ee224c1d09c1f10de02 (patch) | |
tree | 4046b55b7609e20c6ef4cc8732724b774b997bf8 /activesupport/test/xml_mini/nokogiri_engine_test.rb | |
parent | 344ee681d6a89ea1da71c39e75c29e0cbda44914 (diff) | |
download | rails-53dda29f8b34073a4b135ee224c1d09c1f10de02.tar.gz rails-53dda29f8b34073a4b135ee224c1d09c1f10de02.tar.bz2 rails-53dda29f8b34073a4b135ee224c1d09c1f10de02.zip |
Add support for parsing XML and JSON from an IO as well as a string [#2659 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activesupport/test/xml_mini/nokogiri_engine_test.rb')
-rw-r--r-- | activesupport/test/xml_mini/nokogiri_engine_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/test/xml_mini/nokogiri_engine_test.rb b/activesupport/test/xml_mini/nokogiri_engine_test.rb index 886a9d1aba..7c3a591e63 100644 --- a/activesupport/test/xml_mini/nokogiri_engine_test.rb +++ b/activesupport/test/xml_mini/nokogiri_engine_test.rb @@ -148,6 +148,19 @@ class NokogiriEngineTest < Test::Unit::TestCase eoxml end + def test_parse_from_io + io = StringIO.new(<<-eoxml) + <root> + good + <products> + hello everyone + </products> + morning + </root> + eoxml + XmlMini.parse(io) + end + private def assert_equal_rexml(xml) hash = XmlMini.with_backend('REXML') { XmlMini.parse(xml) } |