From d4d1527a92f23f973b405cea42bef8009ce9f4c4 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 27 Feb 2015 07:08:55 +0000 Subject: [PATCH] Fix rubocop warnings --- .rubocop_todo.yml | 4 ++-- test/helpers/geocoder_helper_test.rb | 12 ++++++------ test/helpers/user_roles_helper_test.rb | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 57b992971..845289b14 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -37,7 +37,7 @@ Metrics/BlockNesting: # Offense count: 60 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 1515 + Max: 1523 # Offense count: 68 Metrics/CyclomaticComplexity: @@ -46,7 +46,7 @@ Metrics/CyclomaticComplexity: # Offense count: 2092 # Configuration parameters: AllowURI, URISchemes. Metrics/LineLength: - Max: 520 + Max: 694 # Offense count: 520 # Configuration parameters: CountComments. diff --git a/test/helpers/geocoder_helper_test.rb b/test/helpers/geocoder_helper_test.rb index 789916bb4..e7ef18065 100644 --- a/test/helpers/geocoder_helper_test.rb +++ b/test/helpers/geocoder_helper_test.rb @@ -3,21 +3,21 @@ require "test_helper" class GeocoderHelperTest < ActionView::TestCase def test_result_to_html html = result_to_html(:lat => 1.23, :lon => 4.56, :zoom => 16, :name => "Name") - assert_dom_equal %q(Name), html + assert_dom_equal 'Name', html html = result_to_html(:lat => 1.23, :lon => 4.56, :zoom => 16, :prefix => "Prefix", :name => "Name") - assert_dom_equal %q(Prefix Name), html + assert_dom_equal 'Prefix Name', html html = result_to_html(:lat => 1.23, :lon => 4.56, :zoom => 16, :name => "Name", :suffix => "Suffix") - assert_dom_equal %q(Name Suffix), html + assert_dom_equal 'Name Suffix', html html = result_to_html(:lat => 1.23, :lon => 4.56, :zoom => 16, :prefix => "Prefix", :name => "Name", :suffix => "Suffix") - assert_dom_equal %q(Prefix Name Suffix), html + assert_dom_equal 'Prefix Name Suffix', html html = result_to_html(:type => "node", :id => 123456, :name => "Name") - assert_dom_equal %q(Name), html + assert_dom_equal 'Name', html html = result_to_html(:min_lat => 1.23, :max_lat => 4.56, :min_lon => -1.23, :max_lon => 2.34, :name => "Name") - assert_dom_equal %q(NameName), icon + assert_dom_equal 'This user is a moderator', icon end def test_role_icon_administrator @user = users(:administrator_user) icon = role_icon(users(:normal_user), "moderator") - assert_dom_equal %q(Grant moderator access), icon + assert_dom_equal 'Grant moderator access', icon icon = role_icon(users(:moderator_user), "moderator") - assert_dom_equal %q(Revoke moderator access), icon + assert_dom_equal 'Revoke moderator access', icon end def test_role_icons_normal @@ -30,22 +30,22 @@ class UserRolesHelperTest < ActionView::TestCase assert_dom_equal " ", icons icons = role_icons(users(:moderator_user)) - assert_dom_equal %q( This user is a moderator), icons + assert_dom_equal ' This user is a moderator', icons icons = role_icons(users(:super_user)) - assert_dom_equal %q( This user is an administrator This user is a moderator), icons + assert_dom_equal ' This user is an administrator This user is a moderator', icons end def test_role_icons_administrator @user = users(:administrator_user) icons = role_icons(users(:normal_user)) - assert_dom_equal %q( Grant administrator access Grant moderator access), icons + assert_dom_equal ' Grant administrator access Grant moderator access', icons icons = role_icons(users(:moderator_user)) - assert_dom_equal %q( Grant administrator access Revoke moderator access), icons + assert_dom_equal ' Grant administrator access Revoke moderator access', icons icons = role_icons(users(:super_user)) - assert_dom_equal %q( Revoke administrator access Revoke moderator access), icons + assert_dom_equal ' Revoke administrator access Revoke moderator access', icons end end -- 2.39.5