test(flipper): reset flipper flags before each test

This commit is contained in:
Paul Chavard 2022-10-12 11:47:26 +02:00
parent 8eb42baba5
commit 155c71b169

View file

@ -120,6 +120,10 @@ RSpec.configure do |config|
end
end
config.before(:each, type: Proc.new { |type| type != :system }) do
Flipper.instance = Flipper.new(Flipper::Adapters::Memory.new)
end
config.include Shoulda::Matchers::ActiveRecord, type: :model
config.include Shoulda::Matchers::ActiveModel, type: :model
config.include Devise::Test::ControllerHelpers, type: :controller