Sha256: c6bc3e3733fd799fab67dd9d61787027dcf737edb732616e54513a947d8068ef

Contents?: true

Size: 824 Bytes

Versions: 11

Compression:

Stored size: 824 Bytes

Contents

ENV["TEST"] = "1"
# Ensures aws api never called. Fixture home folder does not contain ~/.aws/credentails
ENV["HOME"] = "spec/fixtures/home"
ENV["SONIC_ROOT"] = "spec/fixtures/project"

# 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/sonic"

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

11 entries across 11 versions & 1 rubygems

Version Path
sonic-screwdriver-2.2.7 spec/spec_helper.rb
sonic-screwdriver-2.2.6 spec/spec_helper.rb
sonic-screwdriver-2.2.5 spec/spec_helper.rb
sonic-screwdriver-2.2.4 spec/spec_helper.rb
sonic-screwdriver-2.2.3 spec/spec_helper.rb
sonic-screwdriver-2.2.2 spec/spec_helper.rb
sonic-screwdriver-2.2.1 spec/spec_helper.rb
sonic-screwdriver-2.2.0 spec/spec_helper.rb
sonic-screwdriver-2.1.1 spec/spec_helper.rb
sonic-screwdriver-2.1.0 spec/spec_helper.rb
sonic-screwdriver-2.0.0 spec/spec_helper.rb