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:
commit
a45f300e5f
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue