summaryrefslogtreecommitdiff
path: root/spec/gitlab_metrics_spec.rb
diff options
context:
space:
mode:
authorAsh McKenzie <ash@the-rebellion.net>2018-07-20 11:34:01 +1000
committerAsh McKenzie <ash@the-rebellion.net>2018-07-20 22:28:58 +1000
commitc92bfcefece5eea1fa30f75f7e99212c09b5792e (patch)
tree09b5c83caadd778e4173257469ade986665ce12e /spec/gitlab_metrics_spec.rb
parent41396a775e13734eeb67df715744a16b622ed7b7 (diff)
downloadgitlab-shell-c92bfcefece5eea1fa30f75f7e99212c09b5792e.tar.gz
Rspec upgrade and deprecation fixesash.mckenzie/minor-tidy-up
Diffstat (limited to 'spec/gitlab_metrics_spec.rb')
-rw-r--r--spec/gitlab_metrics_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/gitlab_metrics_spec.rb b/spec/gitlab_metrics_spec.rb
index 024a85a..00e94b5 100644
--- a/spec/gitlab_metrics_spec.rb
+++ b/spec/gitlab_metrics_spec.rb
@@ -3,6 +3,10 @@ require_relative '../lib/gitlab_metrics'
describe GitlabMetrics do
describe '.measure' do
+ before do
+ $logger = double('logger').as_null_object
+ end
+
it 'returns the return value of the block' do
val = described_class.measure('foo') { 10 }
@@ -10,7 +14,7 @@ describe GitlabMetrics do
end
it 'writes the metrics data to a log file' do
- expect(described_class.logger).to receive(:debug).
+ expect($logger).to receive(:debug).
with('metrics', a_metrics_log_message('foo'))
described_class.measure('foo') { 10 }