Sha256: 7996c1119c3928fc1cb36c27d0a7e1117e910c11e10817dc084f8818cb19fd61

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

if ENV['TRAVIS_PULL_REQUEST'] && ["1", "true"].include?(ENV['TRAVIS_PULL_REQUEST']) && ENV['FOG_REAL'] && ["1", "true"].include?(ENV['FOG_REAL'])
  require "clarence"
  Bitches.leave
end

require "simplecov" unless ENV['NO_SIMPLECOV']
require 'minitest/autorun'

ENV['AWS_ACCESS_KEY_ID'] ||= "abcde1234"
ENV['AWS_SECRET_ACCESS_KEY'] ||= "abcde1234"
ENV['AWS_ACCOUNT_ID'] ||= "1234567890"

require "fog/bouncer"
require "scrolls"

Scrolls::Log.stream = File.open(File.dirname(__FILE__) + '/../logs/test.log', 'w')

module TestLogger
  def self.log(data, &blk)
    Scrolls.log(data, &blk)
  end
end

Fog::Bouncer.instrument_with(TestLogger.method(:log))

def load_security(security)
  Fog::Bouncer.load File.dirname(__FILE__) + "/support/security/#{security}.rb"
end

Fog.mock! unless ENV['FOG_REAL'] && ["1", "true"].include?(ENV['FOG_REAL'])

MiniTest::Unit.after_tests do
  Fog::Bouncer.doorlists.each do |name, doorlist|
    doorlist.groups.each do |group|
      group.revoke
    end

    doorlist.groups.each do |group|
      group.destroy
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fog-bouncer-0.2.5 spec/helper.rb
fog-bouncer-0.2.4 spec/helper.rb
fog-bouncer-0.2.3 spec/helper.rb