summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-31 09:24:19 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-07-31 09:24:19 +0200
commitde8f8cdf068ba4f029539217daccbbf6ccc6c6f6 (patch)
tree139e15ec008e02c2746dfdfef8f9e694075f565d /spec/support
parent719eeb0f49e4200c345ba555b343a65227a3258e (diff)
downloadgitlab-ce-de8f8cdf068ba4f029539217daccbbf6ccc6c6f6.tar.gz
Improve authentication activity code readability
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/stub_metrics.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/support/helpers/stub_metrics.rb b/spec/support/helpers/stub_metrics.rb
index d882346ec52..64983fdf222 100644
--- a/spec/support/helpers/stub_metrics.rb
+++ b/spec/support/helpers/stub_metrics.rb
@@ -5,9 +5,8 @@ module StubMetrics
def stub_authentication_activity_metrics(debug: false)
authentication_metrics.each_counter do |name, metric, description|
- double("#{metric} - #{description}").tap do |counter|
- allow(authentication_metrics).to receive(name).and_return(counter)
- end
+ allow(authentication_metrics).to receive(name)
+ .and_return(double("#{metric} - #{description}"))
end
debug_authentication_activity_metrics if debug