Sha256: 22d59560e6d462b76f8f919dbcc6f201555410c4f6395bb38c0716b0b303c03f

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

PROJECT_ROOT = File.expand_path('..', File.dirname(__FILE__))

if ENV['COVERAGE']
  require 'simplecov'
  SimpleCov.start do
    libdir = File.join(PROJECT_ROOT, 'lib')
    add_filter do |src|
      !src.filename.match(%r[\A#{libdir}])
    end

    %w[Deployment Source Environment Module Git SVN Action Util].each do |group|
      add_group group, "lib/r10k/#{group.downcase}"
    end
  end
end

require 'r10k'

Dir.glob(File.expand_path('spec/shared-examples/**/*.rb', PROJECT_ROOT)).each { |file| require file }

require 'shared-contexts/git-fixtures'
require 'shared-contexts/tarball'
require 'matchers/exit_with'
require 'matchers/match_realpath'
require 'r10k-mocks'

# Add a negated version of the change matcher.
RSpec::Matchers.define_negated_matcher :not_change, :change

RSpec.configure do |config|
  config.before(:all) do
    Log4r::Logger.global.level = Log4r::OFF
  end
end

shared_context 'fail on execution' do
  before do
    allow_any_instance_of(described_class).to receive(:execute).and_raise "Tests should never invoke system calls"
    allow_any_instance_of(R10K::Util::Subprocess).to receive(:execute).and_raise "Tests should never invoke system calls"
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
r10k-3.15.0 spec/spec_helper.rb
akerl-r10k-3.14.2.1 spec/spec_helper.rb
r10k-3.14.2 spec/spec_helper.rb
r10k-3.14.1 spec/spec_helper.rb
r10k-3.14.0 spec/spec_helper.rb