summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksei Lipniagov <alipniagov@gitlab.com>2019-07-11 12:19:05 +0300
committerAleksei Lipniagov <alipniagov@gitlab.com>2019-07-11 12:19:05 +0300
commitd708984f68a90fee8835729515c2367d4a09da83 (patch)
tree0fd59f6cfc8c850b629f5b6c81d98d4d2be0b83c
parentfb3a698118887db5aad6ffd250d3758741f51aae (diff)
downloadgitlab-ce-62747-gather-ci-tests-memory-usage-data.tar.gz
Move the comment above the method definition62747-gather-ci-tests-memory-usage-data
-rw-r--r--spec/support/helpers/test_env.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb
index 634d62101bd..893b10ea752 100644
--- a/spec/support/helpers/test_env.rb
+++ b/spec/support/helpers/test_env.rb
@@ -308,13 +308,11 @@ module TestEnv
Thread.current[:current_example_group]
end
+ # looking for a top-level `describe`
def topmost_example_group
- topmost_group = current_example_group
-
- # looking for a top-level `describe`
- topmost_group = topmost_group[:parent_example_group] until topmost_group[:parent_example_group].nil?
-
- topmost_group
+ example_group = current_example_group
+ example_group = example_group[:parent_example_group] until example_group[:parent_example_group].nil?
+ example_group
end
private