Permalink
Browse files

add codeclimate coverage reports

  • Loading branch information...
1 parent 943f1b2 commit c9a86429d5ce414378dcb09e03b52ce6e5df81c8 @minad minad committed May 24, 2015
Showing with 43 additions and 17 deletions.
  1. +19 −15 .travis.yml
  2. +5 −1 Gemfile
  3. +6 −0 test/core/helper.rb
  4. +6 −0 test/literate/helper.rb
  5. +7 −1 test/rails/test/helper.rb
View
@@ -15,21 +15,25 @@ sudo: false
script: "bundle exec rake $TASK"
env:
- - "TASK=test:core_and_plugins TILT=master"
- - "TASK=test:core_and_plugins TILT=1.3.7"
- - "TASK=test:core_and_plugins TILT=1.4.1"
- - "TASK=test:core_and_plugins TILT=2.0.1"
- - "TASK=test:rails RAILS=master"
- - "TASK=test:rails RAILS=3.1.12 TILT=1.3.4"
- - "TASK=test:rails RAILS=3.2.21 TILT=1.3.4"
- - "TASK=test:rails RAILS=4.0.13"
- - "TASK=test:rails RAILS=4.1.10"
- - "TASK=test:rails RAILS=4.2.1"
- - "TASK=test:sinatra SINATRA=master"
- - "TASK=test:sinatra SINATRA=1.3.6"
- - "TASK=test:sinatra SINATRA=1.4.6"
- - "TASK=bench"
- - "TASK=bench slow=1"
+ global:
+ # travis encrypt CODECLIMATE_REPO_TOKEN=???
+ - secure: "a7sD9iwPJJn3Fj+mn62GAmy/PEguh3elrilsp1KS+WfDiCiIKD8Q5KG2Jv67DGcQAGI3dPWeh7+ZhZ/W7nEipwWUBmSvGYVeoF63y8j6mNRLeekqspj94l47hXyFePj9bCadY1b1/xY4lE1pMEU8eA8AOUHUqCSuH+Kk/MuvyLM="
+ matrix:
+ - "TASK=test:core_and_plugins TILT=master"
+ - "TASK=test:core_and_plugins TILT=1.3.7"
+ - "TASK=test:core_and_plugins TILT=1.4.1"
+ - "TASK=test:core_and_plugins TILT=2.0.1"
+ - "TASK=test:rails RAILS=master"
+ - "TASK=test:rails RAILS=3.1.12 TILT=1.3.4"
+ - "TASK=test:rails RAILS=3.2.21 TILT=1.3.4"
+ - "TASK=test:rails RAILS=4.0.13"
+ - "TASK=test:rails RAILS=4.1.10"
+ - "TASK=test:rails RAILS=4.2.1"
+ - "TASK=test:sinatra SINATRA=master"
+ - "TASK=test:sinatra SINATRA=1.3.6"
+ - "TASK=test:sinatra SINATRA=1.4.6"
+ - "TASK=bench"
+ - "TASK=bench slow=1"
matrix:
exclude:
View
@@ -37,7 +37,7 @@ if RUBY_VERSION >= '2.2.0'
gem 'test-unit', platforms: :mri
end
-if RUBY_ENGINE == 'rbx' && !ENV.key?('TRAVIS')
+if RUBY_ENGINE == 'rbx' && !ENV['TRAVIS']
gem 'psych'
end
@@ -63,3 +63,7 @@ if ENV['TASK'] == 'bench'
gem 'erubis'
gem 'haml'
end
+
+if ENV['CODECLIMATE_REPO_TOKEN']
+ gem 'codeclimate-test-reporter'
+end
View
@@ -1,5 +1,11 @@
# encoding: utf-8
+begin
+ require 'codeclimate-test-reporter'
+ CodeClimate::TestReporter.start
+rescue LoadError
+end
+
require 'minitest/autorun'
require 'slim'
require 'slim/grammar'
@@ -1,3 +1,9 @@
+begin
+ require 'codeclimate-test-reporter'
+ CodeClimate::TestReporter.start
+rescue LoadError
+end
+
require 'slim'
require 'slim/logic_less'
require 'slim/translator'
@@ -1,3 +1,9 @@
+begin
+ require 'codeclimate-test-reporter'
+ CodeClimate::TestReporter.start
+rescue LoadError
+end
+
# Configure Rails Envinronment
ENV["RAILS_ENV"] = "test"
@@ -13,7 +19,7 @@ class ActionDispatch::IntegrationTest
def assert_xpath(xpath, message="Unable to find '#{xpath}' in response body.")
assert_response :success, "Response type is not :success (code 200..299)."
-
+
body = @response.body
assert !body.empty?, "No response body found."

0 comments on commit c9a8642

Please sign in to comment.