From 6b31fd8070dff823a020946a57fc83b41e17a0c1 Mon Sep 17 00:00:00 2001 From: prakashmurthy Date: Sun, 8 May 2011 06:13:18 -0600 Subject: Lighthouse ticket # 6334; added tests to verify that spaces in key are dasherized. --- activesupport/test/xml_mini_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activesupport/test') 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 "Howdy" 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 "33" + 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 "33" + end # TODO: test the remaining functions hidden in #to_tag. end end -- cgit v1.2.3