Skip to content
Snippets Groups Projects
Commit 12e84b6b authored by Alexis Kalderimis's avatar Alexis Kalderimis :speech_balloon:
Browse files

Freeze time in metrics value expectation

parent b003ead8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5,6 +5,10 @@ RSpec.shared_examples 'a correct instrumented metric value' do |params|
let(:options) { params[:options] }
let(:metric) { described_class.new(time_frame: time_frame, options: options) }
 
around do |example|
freeze_time { example.run }
end
before do
if described_class.respond_to?(:relation) && described_class.relation.respond_to?(:connection)
allow(described_class.relation.connection).to receive(:transaction_open?).and_return(false)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment