From ed1ed9ed97f7d30ba8221079365634aa9c4bf24c Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 5 Jun 2007 14:09:15 +0000 Subject: revert [6924] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6946 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/hash_ext_test.rb | 39 ++-------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'activesupport/test/core_ext/hash_ext_test.rb') diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index 73b873aee8..a428fe5061 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -370,7 +370,7 @@ class HashToXmlTest < Test::Unit::TestCase def test_two_levels_with_array xml = { :name => "David", :addresses => [{ :street => "Paulina" }, { :street => "Evergreen" }] }.to_xml(@xml_options) assert_equal "", xml.first(8) - assert xml.include?(%(
)) + assert xml.include?(%(
)) assert xml.include?(%(
Paulina
)) assert xml.include?(%(
Evergreen
)) assert xml.include?(%(David)) @@ -378,7 +378,7 @@ class HashToXmlTest < Test::Unit::TestCase def test_three_levels_with_array xml = { :name => "David", :addresses => [{ :streets => [ { :name => "Paulina" }, { :name => "Paulina" } ] } ] }.to_xml(@xml_options) - assert xml.include?(%(
)) + assert xml.include?(%(
)) end def test_single_record_from_xml @@ -516,41 +516,6 @@ class HashToXmlTest < Test::Unit::TestCase assert_equal expected_topic_hash, Hash.from_xml(topic_xml)["rsp"]["photos"]["photo"] end - - def test_empty_array_from_xml - blog_xml = <<-XML - - - - XML - expected_blog_hash = {"blog" => {"posts" => []}} - assert_equal expected_blog_hash, Hash.from_xml(blog_xml) - end - - def test_array_with_one_entry_from_xml - blog_xml = <<-XML - - - a post - - - XML - expected_blog_hash = {"blog" => {"posts" => ["a post"]}} - assert_equal expected_blog_hash, Hash.from_xml(blog_xml) - end - - def test_array_with_multiple_entries_from_xml - blog_xml = <<-XML - - - a post - another post - - - XML - expected_blog_hash = {"blog" => {"posts" => ["a post", "another post"]}} - assert_equal expected_blog_hash, Hash.from_xml(blog_xml) - end def test_xsd_like_types_from_xml bacon_xml = <<-EOT -- cgit v1.2.3