aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorprakashmurthy <prakblr@yahoo.com>2011-05-08 06:13:18 -0600
committerprakashmurthy <prakblr@yahoo.com>2011-05-08 06:13:18 -0600
commit6b31fd8070dff823a020946a57fc83b41e17a0c1 (patch)
treebf7dbe0111fe7f8bbe8ab69144d23664180fd6ff /activesupport/test
parent80bf68aa1ba7aea9aded5094e81af05b159ceaa4 (diff)
downloadrails-6b31fd8070dff823a020946a57fc83b41e17a0c1.tar.gz
rails-6b31fd8070dff823a020946a57fc83b41e17a0c1.tar.bz2
rails-6b31fd8070dff823a020946a57fc83b41e17a0c1.zip
Lighthouse ticket # 6334; added tests to verify that spaces in key are dasherized.
Diffstat (limited to 'activesupport/test')
-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