Commit 2b5a639d authored by Pawel Chojnacki's avatar Pawel Chojnacki

use public_send where appropriate

parent 75b49298
......@@ -35,19 +35,19 @@ describe Gitlab::Metrics::Concern do
it 'calls fetch_metric' do
expect(subject).to receive(:init_metric).with(metric_type, metric_name, docstring: docstring)
subject.send(metric_name)
subject.public_send(metric_name)
end
end
context 'metric is cached' do
before do
subject.send(metric_name)
subject.public_send(metric_name)
end
it 'returns cached metric' do
expect(subject).not_to receive(:init_metric)
subject.send(metric_name)
subject.public_send(metric_name)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment