# frozen_string_literal: true
if ENV['COVERAGE'] && !%w(rbx jruby).include?(RUBY_ENGINE)
  ENV['SIMPLECOV_NO_DEFAULTS'] = '1'
  require 'simplecov'
  SimpleCov.command_name 'RSpec'
  SimpleCov.root File.expand_path(File.join(File.dirname(__FILE__), '..'))
  require 'simplecov/defaults'
  SimpleCov::Formatter::HTMLFormatter.send(:define_method, :puts) { |*| }
end

# frozen_string_literal: true
if ENV['COVERAGE'] && !%w(rbx jruby).include?(RUBY_ENGINE)
  ENV['SIMPLECOV_NO_DEFAULTS'] = '1'
  require 'simplecov'
  SimpleCov.command_name "#{$PROGRAM_NAME.sub(%r{^([.]{2}/)+}, '')} #{ARGV.join ' '}".strip
  SimpleCov.root File.expand_path(File.join(File.dirname(__FILE__), '..'))
  require 'simplecov/defaults'
  SimpleCov::Formatter::HTMLFormatter.send(:define_method, :puts) { |*| }
end

Revert "Work around codeclimate-test-reporter deficiency"
Revert "Work around codeclimate-test-reporter deficiency"

This reverts commit fb98b858ebd106d02e4a7e39fdd590375e3c9834.

Apparently fixed in codeclimate-test-reporter v1.0.4
See https://github.com/codeclimate/ruby-test-reporter/issues/162#issuecomment-269668880
