Sha256: 655f89bfd821d0adc68269eb3316620c646f191873842b1fdcab18a647f46e7a

Contents?: true

Size: 972 Bytes

Versions: 3

Compression:

Stored size: 972 Bytes

Contents

ENV['CRYPT_KEEPER_IGNORE_LEGACY_DEPRECATION'] = "true"
require 'coveralls'
Coveralls.wear!
require 'crypt_keeper'

SPEC_ROOT           = Pathname.new File.expand_path File.dirname __FILE__
AR_LOG              = SPEC_ROOT.join('debug.log').to_s
ENCRYPTION_PASSWORD = "supermadsecretstring"

Dir[SPEC_ROOT.join('support/*.rb')].each{|f| require f }

RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  config.after :each do
    descendants = ActiveRecord::Base.descendants.delete_if do |descendant|
      descendant.to_s.include?("SchemaMigration")
    end

    descendants.each do |model|
      model.method(:delete_all).call
    end
  end

  config.after :suite do
    if File.exist?(AR_LOG) && ENV['TRAVIS'].present?
      `grep \"#{ENCRYPTION_PASSWORD}\" #{AR_LOG}`

      if $?.exitstatus == 0
        raise StandardError, "\n\nERROR: The encryption password was found in the logs\n\n"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
crypt_keeper-2.3.0 spec/spec_helper.rb
crypt_keeper-2.2.0 spec/spec_helper.rb
crypt_keeper-2.1.0 spec/spec_helper.rb