mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ruby 1.9 compat: account for hash ordering
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
3a62e0e868
commit
3600536b04
1 changed files with 3 additions and 4 deletions
|
@ -109,19 +109,18 @@ class FormOptionsHelperTest < Test::Unit::TestCase
|
|||
)
|
||||
end
|
||||
|
||||
# FIXME: fails on Ruby 1.9, probably in html-scanner
|
||||
def test_hash_options_for_select
|
||||
assert_dom_equal(
|
||||
"<option value=\"<Kroner>\"><DKR></option>\n<option value=\"Dollar\">$</option>",
|
||||
options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" })
|
||||
options_for_select("$" => "Dollar", "<DKR>" => "<Kroner>").split("\n").sort.join("\n")
|
||||
)
|
||||
assert_dom_equal(
|
||||
"<option value=\"<Kroner>\"><DKR></option>\n<option value=\"Dollar\" selected=\"selected\">$</option>",
|
||||
options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, "Dollar")
|
||||
options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, "Dollar").split("\n").sort.join("\n")
|
||||
)
|
||||
assert_dom_equal(
|
||||
"<option value=\"<Kroner>\" selected=\"selected\"><DKR></option>\n<option value=\"Dollar\" selected=\"selected\">$</option>",
|
||||
options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, [ "Dollar", "<Kroner>" ])
|
||||
options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, [ "Dollar", "<Kroner>" ]).split("\n").sort.join("\n")
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue