From 1b19e33e553a4e84dd68687593b2f956724b7b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 11 Aug 2021 17:18:39 +0200 Subject: [PATCH] Add and apply Naming/VariableName rubocop rule We forgot to use it in one place, and we've found out other institutions using CONSUL whose developers aren't so familiar with Ruby also break this rule, so it might be better to add it explicitly. --- .rubocop.yml | 3 +++ spec/system/sdg_management/targets_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 219a99574..9b5067851 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -193,6 +193,9 @@ Lint/UselessAssignment: Lint/Void: Enabled: true +Naming/VariableName: + Enabled: true + Performance/BlockGivenWithExplicitBlock: Enabled: true diff --git a/spec/system/sdg_management/targets_spec.rb b/spec/system/sdg_management/targets_spec.rb index d1e5ca370..8cc927768 100644 --- a/spec/system/sdg_management/targets_spec.rb +++ b/spec/system/sdg_management/targets_spec.rb @@ -21,7 +21,7 @@ describe "Targets" do goal_8_target_10 = SDG::Target["8.10"] goal_16 = SDG::Goal[16] goal_16_target_10 = SDG::Target["16.10"] - goal_16_target_A = SDG::Target["16.A"] + goal_16_target_a = SDG::Target["16.A"] visit sdg_management_targets_path @@ -29,7 +29,7 @@ describe "Targets" do expect(goal_8_target_2.title).to appear_before(goal_8_target_10.title) expect(goal_8_target_10.title).to appear_before(goal_16.title) expect(goal_16.title).to appear_before(goal_16_target_10.title) - expect(goal_16_target_10.title).to appear_before(goal_16_target_A.title) + expect(goal_16_target_10.title).to appear_before(goal_16_target_a.title) end end end