Sha256: 66a654547fe80247312813c62c814bf0bb151dd511df61cd1ebcf5b62f3ea09c

Contents?: true

Size: 858 Bytes

Versions: 3

Compression:

Stored size: 858 Bytes

Contents

ENV["TEST"] = "1"
ENV["FORGER_ENV"] = "test"
ENV["FORGER_ROOT"] = "spec/fixtures/demo_project"
# Ensures aws api never called. Fixture home folder does not contain ~/.aws/credentails
ENV['HOME'] = "spec/fixtures/home"

# CodeClimate test coverage: https://docs.codeclimate.com/docs/configuring-test-coverage
# require 'simplecov'
# SimpleCov.start

require "pp"
require "byebug"
root = File.expand_path("../", File.dirname(__FILE__))
require "#{root}/lib/forger"

module Helper
  def execute(cmd)
    puts "Running: #{cmd}" if show_command?
    out = `#{cmd}`
    puts out if show_command?
    out
  end

  # Added SHOW_COMMAND because DEBUG is also used by other libraries like
  # bundler and it shows its internal debugging logging also.
  def show_command?
    ENV['DEBUG'] || ENV['SHOW_COMMAND']
  end
end

RSpec.configure do |c|
  c.include Helper
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
forger-1.6.0 spec/spec_helper.rb
forger-1.5.4 spec/spec_helper.rb
forger-1.5.3 spec/spec_helper.rb