diff --git a/Gemfile b/Gemfile index 4638b8e..3f49a19 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,14 @@ source 'https://rubygems.org' # Specify your gem's dependencies in git_evolution.gemspec gemspec + +group :test do + gem 'simplecov' + gem 'coveralls', require: false + gem 'rspec' +end + +group :development do + gem 'pry-byebug' + gem 'rubocop' +end diff --git a/Rakefile b/Rakefile index 809eb56..4c073ff 100644 --- a/Rakefile +++ b/Rakefile @@ -1,2 +1,5 @@ -require "bundler/gem_tasks" +require 'bundler/gem_tasks' +require 'rspec/core/rake_task' +require 'rake/clean' +CLOBBER.include('coverage') diff --git a/spec/support/coverage.rb b/spec/support/coverage.rb new file mode 100644 index 0000000..55f27bb --- /dev/null +++ b/spec/support/coverage.rb @@ -0,0 +1,16 @@ +begin + if ENV['CI'] + require 'coveralls' + Coveralls.wear! + elsif ENV['COVERAGE'] + require 'simplecov' + end + + if ENV['CI'] || ENV['COVERAGE'] + SimpleCov.start do + add_filter '/spec/' + end + end +rescue LoadError => e + warn(e) +end