diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-31 10:24:19 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-07-31 10:24:19 +0300 |
commit | de8f8cdf068ba4f029539217daccbbf6ccc6c6f6 (patch) | |
tree | 139e15ec008e02c2746dfdfef8f9e694075f565d /spec/support | |
parent | 719eeb0f49e4200c345ba555b343a65227a3258e (diff) |
Improve authentication activity code readability
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/stub_metrics.rb | 5 |
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 |