Module SimpleCov
In: lib/simplecov/railtie.rb
lib/simplecov/command_guesser.rb
lib/simplecov/raw_coverage.rb
lib/simplecov/lines_classifier.rb
lib/simplecov/result.rb
lib/simplecov/source_file.rb
lib/simplecov/last_run.rb
lib/simplecov/version.rb
lib/simplecov/file_list.rb
lib/simplecov/exit_codes.rb
lib/simplecov/configuration.rb
lib/simplecov/formatter.rb
lib/simplecov/formatter/simple_formatter.rb
lib/simplecov/formatter/multi_formatter.rb
lib/simplecov/profiles.rb
lib/simplecov/result_merger.rb
lib/simplecov/filter.rb
lib/simplecov.rb

frozen_string_literal: true

Methods

Classes and Modules

Module SimpleCov::CommandGuesser
Module SimpleCov::Configuration
Module SimpleCov::ExitCodes
Module SimpleCov::Formatter
Module SimpleCov::LastRun
Module SimpleCov::RawCoverage
Module SimpleCov::ResultMerger
Class SimpleCov::ArrayFilter
Class SimpleCov::BlockFilter
Class SimpleCov::FileList
Class SimpleCov::Filter
Class SimpleCov::LinesClassifier
Class SimpleCov::Profiles
Class SimpleCov::Railtie
Class SimpleCov::RegexFilter
Class SimpleCov::Result
Class SimpleCov::SourceFile
Class SimpleCov::StringFilter

Constants

VERSION = "0.16.1".freeze

Attributes

exit_exception  [R] 
pid  [RW] 
running  [RW] 

Public Class methods

Finds files that were to be tracked but were not loaded and initializes the line-by-line coverage to zero (if relevant) or nil (comments / whitespace etc).

Clear out the previously cached .result. Primarily useful in testing

Returns the exit status from the exit exception

Applies the configured filters to the given array of SimpleCov::SourceFile items

Applies the configured groups to the given array of SimpleCov::SourceFile items

Applies the profile of given name on SimpleCov configuration

@api private

Usage:

  exit_status = SimpleCov.process_result(SimpleCov.result, exit_status)

Returns the result for the current coverage run, merging it across test suites from cache using SimpleCov::ResultMerger if use_merging is activated (default)

Returns nil if the result has not been computed Otherwise, returns the result

@api private

rubocop:disable Metrics/MethodLength

@api private

Called from at_exit block

Capture the current exception if it exists This will get called inside the at_exit block

Sets up SimpleCov to run against your project. You can optionally specify a profile to use as well as configuration with a block:

  SimpleCov.start
   OR
  SimpleCov.start 'rails' # using rails profile
   OR
  SimpleCov.start do
    add_filter 'test'
  end
    OR
  SimpleCov.start 'rails' do
    add_filter 'test'
  end

Please check out the RDoc for SimpleCov::Configuration to find about available config options

Checks whether we‘re on a proper version of Ruby (likely 1.9+) which provides coverage support

[Validate]