Sha256: 9a317e8189b40e1c50d481ce18bfeb1b4cbdb5b7f577d3319852bb102799fb4a

Contents?: true

Size: 656 Bytes

Versions: 10

Compression:

Stored size: 656 Bytes

Contents

ENV["TEST"] = "1"

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

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

10 entries across 10 versions & 1 rubygems

Version Path
ecic-0.6.2 spec/spec_helper.rb
ecic-0.6.1 spec/spec_helper.rb
ecic-0.6.0 spec/spec_helper.rb
ecic-0.5.0 spec/spec_helper.rb
ecic-0.4.0 spec/spec_helper.rb
ecic-0.3.0 spec/spec_helper.rb
ecic-0.2.2 spec/spec_helper.rb
ecic-0.2.1 spec/spec_helper.rb
ecic-0.2.0 spec/spec_helper.rb
ecic-0.1.0 spec/spec_helper.rb