Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use Ruby 1.9 Hash syntax

  • Loading branch information...
commit 52a625f3a97031871f7ec55ddac87173c2eb467d 1 parent c11090c
@alexeymuranov authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/test/template/form_tag_helper_test.rb
View
6 actionpack/test/template/form_tag_helper_test.rb
@@ -139,20 +139,20 @@ def test_hidden_field_tag_id_sanitized
end
def test_hidden_field_tags_from_flat_hash
- actual = hidden_field_tags_from_flat_hash({ :a => 'b', 'c' => 3 }, :id => nil)
+ actual = hidden_field_tags_from_flat_hash({ a: 'b', 'c' => 3 }, id: nil)
expected = %(<input name="a" type="hidden" value="b" />\n) +
%(<input name="c" type="hidden" value="3" />)
assert_dom_equal expected, actual
end
def test_flat_param_hash_from_nested_hash
- actual = flat_param_hash_from_nested_hash(:a => { :b => ['c', 'd']}, 'e' => 5)
+ actual = flat_param_hash_from_nested_hash(a: { b: ['c', 'd']}, 'e' => 5)
expected = { 'a[b]' => ['c', 'd'], 'e' => 5 }
assert_equal expected, actual
end
def test_hidden_field_tags_from_nested_hash
- actual = hidden_field_tags_from_nested_hash({ :a => { :b => ['c', 'd']}, 'e' => 5 }, :id => nil)
+ actual = hidden_field_tags_from_nested_hash({ a: { b: ['c', 'd']}, 'e' => 5 }, id: nil)
expected = %(<input name="a[b][]" type="hidden" value="c" />\n) +
%(<input name="a[b][]" type="hidden" value="d" />\n) +
%(<input name="e" type="hidden" value="5" />)
Please sign in to comment.
Something went wrong with that request. Please try again.