diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-07 08:10:23 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-01-07 08:10:23 +0000 |
commit | 3600536b04ca7e902c5ad594175feb451261cc81 (patch) | |
tree | f517aa5eb765c67b059c8f56cd6e92ae677845d0 | |
parent | 3a62e0e868c8bf8e2c9312b4610ee057d514f038 (diff) | |
download | rails-3600536b04ca7e902c5ad594175feb451261cc81.tar.gz rails-3600536b04ca7e902c5ad594175feb451261cc81.tar.bz2 rails-3600536b04ca7e902c5ad594175feb451261cc81.zip |
Ruby 1.9 compat: account for hash ordering
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/test/template/form_options_helper_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb index d4a64d4d3c..8ee601f478 100644 --- a/actionpack/test/template/form_options_helper_test.rb +++ b/actionpack/test/template/form_options_helper_test.rb @@ -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 |