提交 6b31fd80 编写于 作者: P prakashmurthy

Lighthouse ticket # 6334; added tests to verify that spaces in key are dasherized.

上级 80bf68aa
......@@ -87,6 +87,16 @@ def to_xml(options) options[:builder].yo(options[:root].to_s) end
@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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册