Sha256: 07cbbe7f5fb13fa8000a72895229b7280498ac1ac132c1fd030e1880dafea2c8

Contents?: true

Size: 850 Bytes

Versions: 7

Compression:

Stored size: 850 Bytes

Contents

require 'open3'

# Add the bin directory, to allow testing of gem executables as if the gem is
# already installed.
root_dir = RSpec::Core::RubyProject.root
exec_dir = root_dir.join('bin')
ENV['PATH'] = [exec_dir, ENV['PATH']].join(File::PATH_SEPARATOR)

# Courtesy of:
# https://raw.github.com/cupakromer/tao-of-tdd/master/adder/spec/support/
#    capture_exec.rb
def exec_io(*cmd)
  cmd = cmd.flatten
  out_err, _exit_code = Open3.capture2e(*cmd)

  out_err
end

RSpec.configure do |config|
  config.filter_run_excluding :wip
  config.run_all_when_everything_filtered = true
  config.order = 'random'
  config.alias_it_should_behave_like_to :has_behavior
  config.alias_it_should_behave_like_to :it_has_behavior, 'has behavior:'
end

def let_double(*doubles)
  doubles.each do |double_sym|
    let(double_sym) { double(double_sym.to_s) }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
containerci-0.6.0 feature/feature_helper.rb
containerci-0.5.0 feature/feature_helper.rb
containerci-0.4.0 feature/feature_helper.rb
containerci-0.3.1 feature/feature_helper.rb
containerci-0.3.0 feature/feature_helper.rb
containerci-0.2.0 feature/feature_helper.rb
containerci-0.1.0 feature/feature_helper.rb