module Workarea::TestCase::Encryption
Public Instance Methods
ensure_encryption_key(key: ActiveSupport::EncryptedFile.generate_key)
click to toggle source
# File lib/workarea/test_case.rb, line 211 def ensure_encryption_key(key: ActiveSupport::EncryptedFile.generate_key) env_key = Mongoid::Encrypted.configuration.env_key @original_key = ENV[env_key] ENV[env_key] ||= key end
reset_encryption_key()
click to toggle source
# File lib/workarea/test_case.rb, line 217 def reset_encryption_key ENV[Mongoid::Encrypted.configuration.env_key] = @original_key end