Skip to content
This repository
Browse code

Ruby 1.9 compat: account for hash ordering

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 3600536b04ca7e902c5ad594175feb451261cc81 1 parent 3a62e0e
Jeremy Kemper jeremy authored

Showing 1 changed file with 3 additions and 4 deletions. Show diff stats Hide diff stats

  1. +3 4 actionpack/test/template/form_options_helper_test.rb
7 actionpack/test/template/form_options_helper_test.rb
@@ -109,19 +109,18 @@ def test_array_options_for_string_include_in_other_string_bug_fix
109 109 )
110 110 end
111 111
112   - # FIXME: fails on Ruby 1.9, probably in html-scanner
113 112 def test_hash_options_for_select
114 113 assert_dom_equal(
115 114 "<option value=\"&lt;Kroner&gt;\">&lt;DKR&gt;</option>\n<option value=\"Dollar\">$</option>",
116   - options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" })
  115 + options_for_select("$" => "Dollar", "<DKR>" => "<Kroner>").split("\n").sort.join("\n")
117 116 )
118 117 assert_dom_equal(
119 118 "<option value=\"&lt;Kroner&gt;\">&lt;DKR&gt;</option>\n<option value=\"Dollar\" selected=\"selected\">$</option>",
120   - options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, "Dollar")
  119 + options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, "Dollar").split("\n").sort.join("\n")
121 120 )
122 121 assert_dom_equal(
123 122 "<option value=\"&lt;Kroner&gt;\" selected=\"selected\">&lt;DKR&gt;</option>\n<option value=\"Dollar\" selected=\"selected\">$</option>",
124   - options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, [ "Dollar", "<Kroner>" ])
  123 + options_for_select({ "$" => "Dollar", "<DKR>" => "<Kroner>" }, [ "Dollar", "<Kroner>" ]).split("\n").sort.join("\n")
125 124 )
126 125 end
127 126

0 comments on commit 3600536

Please sign in to comment.
Something went wrong with that request. Please try again.