Sha256: d392ebbbd312bf8119bd67a0b99f8c7b1e3b5f107e5b30751ed95ad2541cbaf7

Contents?: true

Size: 671 Bytes

Versions: 6

Compression:

Stored size: 671 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/<%= project_name %>"

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

6 entries across 6 versions & 1 rubygems

Version Path
cli-template-4.0.1 lib/templates/default/spec/spec_helper.rb.tt
cli-template-4.0.0 lib/templates/default/spec/spec_helper.rb.tt
cli-template-3.5.1 lib/templates/default/spec/spec_helper.rb.tt
cli-template-3.5.0 lib/templates/default/spec/spec_helper.rb.tt
cli-template-3.4.0 lib/templates/default/spec/spec_helper.rb.tt
cli-template-3.3.0 lib/templates/default/spec/spec_helper.rb.tt