aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-05-08 10:13:39 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-05-08 10:13:39 -0700
commita45f300e5f2d6b6581dd0f0d0f650c83b9773170 (patch)
tree09e84cc8675b76cc199b3bf29e6bd54917214353
parentf69be6ae8f0a309cca59bea2526b71b1029b4beb (diff)
parent6b31fd8070dff823a020946a57fc83b41e17a0c1 (diff)
downloadrails-a45f300e5f2d6b6581dd0f0d0f650c83b9773170.tar.gz
rails-a45f300e5f2d6b6581dd0f0d0f650c83b9773170.tar.bz2
rails-a45f300e5f2d6b6581dd0f0d0f650c83b9773170.zip
Merge pull request #445 from prakashmurthy/lighthouse_6334
Fix for Lighthouse ticket # 6334 : to_xml should render valid xml or raise an error all the time
-rw-r--r--activesupport/test/xml_mini_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/test/xml_mini_test.rb b/activesupport/test/xml_mini_test.rb
index 310d86a019..e2b90ae16e 100644
--- a/activesupport/test/xml_mini_test.rb
+++ b/activesupport/test/xml_mini_test.rb
@@ -87,6 +87,16 @@ module XmlMiniTest
@xml.to_tag(:b, "Howdy", @options)
assert_xml "<b>Howdy</b>"
end
+
+ test "#to_tag should dasherize the space when passed a string with spaces as a key" do
+ @xml.to_tag("New York", 33, @options)
+ assert_xml "<New---York type=\"integer\">33</New---York>"
+ end
+
+ test "#to_tag should dasherize the space when passed a symbol with spaces as a key" do
+ @xml.to_tag(:"New York", 33, @options)
+ assert_xml "<New---York type=\"integer\">33</New---York>"
+ end
# TODO: test the remaining functions hidden in #to_tag.
end
end