mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
53dda29f8b
Signed-off-by: Joshua Peek <josh@joshpeek.com>
29 lines
564 B
Ruby
29 lines
564 B
Ruby
require 'abstract_unit'
|
|
require 'active_support/xml_mini'
|
|
|
|
class REXMLEngineTest < Test::Unit::TestCase
|
|
include ActiveSupport
|
|
|
|
def test_default_is_rexml
|
|
assert_equal XmlMini_REXML, XmlMini.backend
|
|
end
|
|
|
|
def test_set_rexml_as_backend
|
|
XmlMini.backend = 'REXML'
|
|
assert_equal XmlMini_REXML, XmlMini.backend
|
|
end
|
|
|
|
def test_parse_from_io
|
|
XmlMini.backend = 'REXML'
|
|
io = StringIO.new(<<-eoxml)
|
|
<root>
|
|
good
|
|
<products>
|
|
hello everyone
|
|
</products>
|
|
morning
|
|
</root>
|
|
eoxml
|
|
XmlMini.parse(io)
|
|
end
|
|
end
|