123456789_123456789_123456789_123456789_123456789_

Module: SimpleCov::Formatter

Overview

TODO: Documentation on how to build your own formatters

Class Method Summary

Class Method Details

.from_env(env)

[ GitHub ]

  
# File 'lib/simplecov/default_formatter.rb', line 7

def from_env(env)
  formatters = [SimpleCov::Formatter::HTMLFormatter]

  # When running under a CI that uses CodeClimate, JSON output is expected
  if env.fetch("CC_TEST_REPORTER_ID", nil)
    require "simplecov_json_formatter"
    formatters.push(SimpleCov::Formatter::JSONFormatter)
  end

  formatters
end