2020-12-16 09:10:26 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-02-01 12:09:03 +00:00
|
|
|
# Require the provided spec helper and matchers.
|
|
|
|
require 'gitlab/experiment/rspec'
|
2021-03-10 15:09:11 +00:00
|
|
|
require_relative 'stub_snowplow'
|
2021-02-01 12:09:03 +00:00
|
|
|
|
2021-02-23 09:10:45 +00:00
|
|
|
RSpec.configure do |config|
|
2021-03-10 15:09:11 +00:00
|
|
|
config.include StubSnowplow, :experiment
|
|
|
|
|
2021-02-23 09:10:45 +00:00
|
|
|
# Disable all caching for experiments in tests.
|
|
|
|
config.before do
|
|
|
|
allow(Gitlab::Experiment::Configuration).to receive(:cache).and_return(nil)
|
|
|
|
end
|
2021-03-10 15:09:11 +00:00
|
|
|
|
|
|
|
config.before(:each, :experiment) do
|
|
|
|
stub_snowplow
|
|
|
|
end
|
2021-02-23 09:10:45 +00:00
|
|
|
end
|