2020-12-16 04:10:26 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-02-01 07:09:03 -05:00
|
|
|
# Require the provided spec helper and matchers.
|
|
|
|
require 'gitlab/experiment/rspec'
|
2021-03-10 10:09:11 -05:00
|
|
|
require_relative 'stub_snowplow'
|
2021-02-01 07:09:03 -05:00
|
|
|
|
2021-02-23 04:10:45 -05:00
|
|
|
RSpec.configure do |config|
|
2021-03-10 10:09:11 -05:00
|
|
|
config.include StubSnowplow, :experiment
|
|
|
|
|
2021-02-23 04:10:45 -05: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 10:09:11 -05:00
|
|
|
|
|
|
|
config.before(:each, :experiment) do
|
|
|
|
stub_snowplow
|
|
|
|
end
|
2021-02-23 04:10:45 -05:00
|
|
|
end
|