diff options
-rw-r--r-- | activesupport/test/xml_mini_test.rb | 10 |
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 |