summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-12 02:29:33 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-09-18 21:23:45 +0800
commit9ae92b8caa6c11d8860f86b7d6378062215d1b72 (patch)
tree06b7416abad46cb1dd44c19a18a7e40caed30e15 /features
parent4cadf22e208e3be401824f43ab13d5e6f2ff6465 (diff)
downloadgitlab-ce-9ae92b8caa6c11d8860f86b7d6378062215d1b72.tar.gz
Add cop to make sure we don't use ivar in a module
Diffstat (limited to 'features')
-rw-r--r--features/support/env.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/features/support/env.rb b/features/support/env.rb
index 608d988755c..d99078d4fa3 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -42,11 +42,11 @@ module StdoutReporterWithScenarioLocation
# Override the standard reporter to show filename and line number next to each
# scenario for easy, focused re-runs
def before_scenario_run(scenario, step_definitions = nil)
- @max_step_name_length = scenario.steps.map(&:name).map(&:length).max if scenario.steps.any?
+ max_step_name_length = scenario.steps.map(&:name).map(&:length).max if scenario.steps.any?
name = scenario.name
# This number has no significance, it's just to line things up
- max_length = @max_step_name_length + 19
+ max_length = max_step_name_length + 19
out.puts "\n #{'Scenario:'.green} #{name.light_green.ljust(max_length)}" \
" # #{scenario.feature.filename}:#{scenario.line}"
end