1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Aaron Patterson 2011-05-08 10:13:39 -07:00
commit a45f300e5f

View file

@ -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