spec/spec_helper.rb in r10k-1.3.5 vs spec/spec_helper.rb in r10k-1.4.0
- old
+ new
@@ -1,8 +1,23 @@
+if ENV['COVERAGE']
+ require 'simplecov'
+ SimpleCov.start do
+ add_filter do |src|
+ !src.filename.match(%r[lib/r10k])
+ 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'
require 'shared-examples/git-ref'
+require 'matchers/exit_with'
+require 'r10k-mocks'
PROJECT_ROOT = File.expand_path('..', File.dirname(__FILE__))
require 'vcr'
VCR.configure do |vcr|
@@ -14,15 +29,12 @@
RSpec.configure do |config|
# Filter out integration tests by default
#
# To run integration tests, run `rspec --tag integration`
config.filter_run_excluding :integration => true
-end
-shared_context 'stub logging' do
- before do
- log = double('stub logger').as_null_object
- allow_any_instance_of(described_class).to receive(:logger).and_return log
+ config.before(:all) do
+ Log4r::Logger.global.level = 10
end
end
shared_context 'fail on execution' do
before do