diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-19 14:54:06 +0100 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-29 15:13:04 +0100 |
commit | f5383578d92d525881bae909740306c57fb1cca0 (patch) | |
tree | e8c75c2d982074b668a96d7ebc1312ca90e2a6aa /spec | |
parent | 3e898be8aa80993a8af016b351c796beb8750d2e (diff) | |
download | gitlab-ce-f5383578d92d525881bae909740306c57fb1cca0.tar.gz |
NullMetric as a singleton
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/metrics/concern_spec.rb | 4 |
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 |