summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--spec/spec_helper.rb11
2 files changed, 12 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
index 306a0b18b0..4f505f6f38 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,6 +9,7 @@ group(:docgen) do
end
group(:development, :test) do
+ gem "simplecov"
gem 'rack', "~> 1.5.1"
gem 'ruby-shadow', :platforms => :ruby unless RUBY_PLATFORM.downcase.match(/(darwin|freebsd)/)
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 2b3182fed2..02c58ddef7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -40,6 +40,17 @@ $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
$:.unshift(File.expand_path("../lib", __FILE__))
$:.unshift(File.dirname(__FILE__))
+if ENV["COVERAGE"]
+ require 'simplecov'
+ SimpleCov.start do
+ add_filter "/spec/"
+ add_group "Remote File", "remote_file"
+ add_group "Resources", "/resource/"
+ add_group "Providers", "/provider/"
+ add_group "Knife", "knife"
+ end
+end
+
require 'chef'
require 'chef/knife'
Chef::Knife.load_commands