From 7c260ae20170159f85d8b7ded1209f12653934fc Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 12 Aug 2017 20:31:46 +0900 Subject: Fix RuboCop offenses And enable `context_dependent` of Style/BracesAroundHashParameters cop. --- actionview/test/template/form_collections_helper_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionview/test/template/form_collections_helper_test.rb') diff --git a/actionview/test/template/form_collections_helper_test.rb b/actionview/test/template/form_collections_helper_test.rb index bba529a98a..6db55a1447 100644 --- a/actionview/test/template/form_collections_helper_test.rb +++ b/actionview/test/template/form_collections_helper_test.rb @@ -95,7 +95,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection radio accepts html options as input" do collection = [[1, true], [0, false]] - with_collection_radio_buttons :user, :active, collection, :last, :first, {}, class: "special-radio" + with_collection_radio_buttons :user, :active, collection, :last, :first, {}, { class: "special-radio" } assert_select "input[type=radio][value=true].special-radio#user_active_true" assert_select "input[type=radio][value=false].special-radio#user_active_false" @@ -215,7 +215,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection radio buttons generates a hidden field using the given :name in :html_options" do collection = [Category.new(1, "Category 1"), Category.new(2, "Category 2")] - with_collection_radio_buttons :user, :category_ids, collection, :id, :name, {}, name: "user[other_category_ids]" + with_collection_radio_buttons :user, :category_ids, collection, :id, :name, {}, { name: "user[other_category_ids]" } assert_select "input[type=hidden][name='user[other_category_ids]'][value='']", count: 1 end @@ -259,7 +259,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection check boxes generates a hidden field using the given :name in :html_options" do collection = [Category.new(1, "Category 1"), Category.new(2, "Category 2")] - with_collection_check_boxes :user, :category_ids, collection, :id, :name, {}, name: "user[other_category_ids][]" + with_collection_check_boxes :user, :category_ids, collection, :id, :name, {}, { name: "user[other_category_ids][]" } assert_select "input[type=hidden][name='user[other_category_ids][]'][value='']", count: 1 end @@ -446,7 +446,7 @@ class FormCollectionsHelperTest < ActionView::TestCase test "collection check boxes accepts html options" do collection = [[1, "Category 1"], [2, "Category 2"]] - with_collection_check_boxes :user, :category_ids, collection, :first, :last, {}, class: "check" + with_collection_check_boxes :user, :category_ids, collection, :first, :last, {}, { class: "check" } assert_select 'input.check[type=checkbox][value="1"]' assert_select 'input.check[type=checkbox][value="2"]' -- cgit v1.2.3