Skip to content

Commit

Permalink
Use new mock behaviour in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
atyndall committed Aug 18, 2021
1 parent ab60c70 commit 97505b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
# Set up codebase
require 'kms_rails'
require 'kms_rails/kms_client_mock'
KmsRails.configure do |config|
config.fake_kms_api = true
end

# Disable ActiveJob noise
ActiveJob::Base.logger = Logger.new(nil)
Expand Down Expand Up @@ -146,6 +143,12 @@
# end

# Ensure configuration is reset after each test
config.before(:each) do
KmsRails.configure do |c|
c.kms_client = KmsRails::KmsClientMock.new
end
end

config.after(:each) do
KmsRails.reset_config
end
Expand Down

0 comments on commit 97505b9

Please sign in to comment.