Module: Parliament::Utils::TestHelpers::SimpleCovHelper

Included in:
Parliament::Utils::TestHelpers
Defined in:
lib/parliament/utils/test_helpers/simplecov_helper.rb

Class Method Summary collapse

Class Method Details

.load_rspec_config(_config) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/parliament/utils/test_helpers/simplecov_helper.rb', line 8

def self.load_rspec_config(_config)
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
                                                                   Coveralls::SimpleCov::Formatter,
                                                                   SimpleCov::Formatter::HTMLFormatter
                                                                 ])

  profile = defined?(Rails) ? 'rails' : nil

  SimpleCov.start profile do
    add_filter 'spec'
  end
end