Skip to content

Commit

Permalink
Update codeclimate test reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
AMHOL committed Dec 7, 2016
1 parent de259d0 commit d3804cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -5,6 +5,8 @@ cache: bundler
bundler_args: --without console
script:
- bundle exec rake spec
after_success:
- '[ -d coverage ] && bundle exec codeclimate-test-reporter'
rvm:
- 2.0
- 2.1
Expand All @@ -17,6 +19,7 @@ rvm:
env:
global:
- JRUBY_OPTS='--dev -J-Xmx1024M'
- COVERAGE='true'
matrix:
allow_failures:
- rvm: ruby-head
Expand Down
5 changes: 4 additions & 1 deletion Gemfile
Expand Up @@ -3,7 +3,10 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'codeclimate-test-reporter', platform: :rbx, require: false
platforms :mri do
gem 'codeclimate-test-reporter', require: false
gem 'simplecov', require: false
end
end

group :tools do
Expand Down
13 changes: 8 additions & 5 deletions spec/spec_helper.rb
@@ -1,3 +1,11 @@
if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.3.1'
require 'simplecov'

SimpleCov.start do
add_filter '/spec/'
end
end

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.expect_with :rspec do |expectations|
Expand Down Expand Up @@ -76,11 +84,6 @@
Kernel.srand config.seed
end

if RUBY_ENGINE == 'rbx'
require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start
end

require 'dry/container'
require 'dry/container/stub'

Expand Down

0 comments on commit d3804cf

Please sign in to comment.