Class: CodeClimate::TestReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/codeclimate-test-reporter.rb

Defined Under Namespace

Classes: API, Formatter

Constant Summary collapse

VERSION =
"0.0.4"

Class Method Summary collapse

Class Method Details

.run?Boolean

Returns:

  • (Boolean)


171
172
173
# File 'lib/codeclimate-test-reporter.rb', line 171

def self.run?
  !!ENV["CODECLIMATE_REPO_TOKEN"]
end

.startObject



160
161
162
163
164
165
166
167
168
169
# File 'lib/codeclimate-test-reporter.rb', line 160

def self.start
  if run?
    require "simplecov"
    ::SimpleCov.add_filter 'vendor'
    ::SimpleCov.formatter = Formatter
    ::SimpleCov.start("test_frameworks")
  else
    puts("Not reporting to Code Climate because ENV['CODECLIMATE_REPO_TOKEN'] is not set.")
  end
end