summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2018-01-19 14:54:06 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2018-01-29 15:13:04 +0100
commitf5383578d92d525881bae909740306c57fb1cca0 (patch)
treee8c75c2d982074b668a96d7ebc1312ca90e2a6aa /spec
parent3e898be8aa80993a8af016b351c796beb8750d2e (diff)
downloadgitlab-ce-f5383578d92d525881bae909740306c57fb1cca0.tar.gz
NullMetric as a singleton
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/metrics/concern_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/metrics/concern_spec.rb b/spec/lib/gitlab/metrics/concern_spec.rb
index 1f750397750..9d0eddc7355 100644
--- a/spec/lib/gitlab/metrics/concern_spec.rb
+++ b/spec/lib/gitlab/metrics/concern_spec.rb
@@ -53,7 +53,9 @@ describe Gitlab::Metrics::Concern do
describe "#fetch_#{metric_type}" do
let(:fetch_method) { "fetch_#{metric_type}".to_sym }
- let(:null_metric) { Gitlab::Metrics::NullMetric.new }
+ let(:_metric_type) { metric_type }
+
+ let(:null_metric) { Gitlab::Metrics::NullMetric.instance }
context "when #{metric_type} is not cached" do
it 'initializes counter metric' do