Sha256: da126f0d1b7997e7265d5550fd006ae290d62ce9d9e3d9c09b3ccdb51427412e

Contents?: true

Size: 1.02 KB

Versions: 11

Compression:

Stored size: 1.02 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 'matchers/exit_with'
require 'matchers/match_realpath'
require 'r10k-mocks'

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

11 entries across 11 versions & 1 rubygems

Version Path
r10k-2.3.1 spec/spec_helper.rb
r10k-2.3.0 spec/spec_helper.rb
r10k-2.2.2 spec/spec_helper.rb
r10k-2.2.1 spec/spec_helper.rb
r10k-2.2.0 spec/spec_helper.rb
r10k-2.1.1 spec/spec_helper.rb
r10k-2.1.0 spec/spec_helper.rb
r10k-2.0.3 spec/spec_helper.rb
r10k-2.0.2 spec/spec_helper.rb
r10k-2.0.1 spec/spec_helper.rb
r10k-2.0.0 spec/spec_helper.rb