Sha256: 3bb42abfda366cd069e0687dbcb09e51d0cd7f911d5b5945bf9a49e4903b88ad

Contents?: true

Size: 552 Bytes

Versions: 6

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

require 'simplecov'
require './spec/support/simplecov_quality_formatter'

module SimpleCovHelper
  def start_simple_cov(name)
    SimpleCov.start do
      add_filter '/spec/'
      command_name name

      formatters = [SimpleCov::Formatter::QualityFormatter]

      if ENV['TRAVIS']
        require 'codeclimate-test-reporter'

        formatters << CodeClimate::TestReporter::Formatter if CodeClimate::TestReporter.run?
      end

      formatter SimpleCov::Formatter::MultiFormatter.new(*formatters)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
modis-4.0.1 spec/support/simplecov_helper.rb
modis-4.0.0 spec/support/simplecov_helper.rb
modis-3.3.0 spec/support/simplecov_helper.rb
modis-3.2.0 spec/support/simplecov_helper.rb
modis-3.1.0 spec/support/simplecov_helper.rb
modis-3.0.0 spec/support/simplecov_helper.rb