Module: CodeClimate::TestReporter

Defined in:
lib/code_climate/test_reporter.rb,
lib/code_climate/test_reporter/client.rb,
lib/code_climate/test_reporter/version.rb,
lib/code_climate/test_reporter/formatter.rb,
lib/code_climate/test_reporter/exception_message.rb

Defined Under Namespace

Classes: Client, ExceptionMessage, Formatter, VCRMessage, WebMockMessage

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.run?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/code_climate/test_reporter.rb', line 15

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

.startObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/code_climate/test_reporter.rb', line 4

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