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.2"

Class Method Summary collapse

Class Method Details

.run?Boolean

Returns:

  • (Boolean)


167
168
169
# File 'lib/codeclimate-test-reporter.rb', line 167

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

.startObject



156
157
158
159
160
161
162
163
164
165
# File 'lib/codeclimate-test-reporter.rb', line 156

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