Module: SimpleCov::CommandGuesser

Defined in:
lib/simplecov/command_guesser.rb

Overview

Helper that tries to find out what test suite is running (for SimpleCov.command_name)

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.original_program_nameObject



31
32
33
# File 'lib/simplecov/command_guesser.rb', line 31

def original_program_name
  @original_program_name || original_run_command.to_s[/\A\s*(\S+)/, 1]
end

.original_run_commandObject

Storage for the original command line call that invoked the test suite. This has got to be stored as early as possible because i.e. rake and test/unit 2 have a habit of tampering with ARGV, which makes i.e. the automatic distinction between rails unit/functional/integration tests impossible without this cached item.



14
15
16
# File 'lib/simplecov/command_guesser.rb', line 14

def original_run_command
  @original_run_command
end

Class Method Details

.guessObject



35
36
37
38
# File 'lib/simplecov/command_guesser.rb', line 35

def guess
  framework = from_executable_name || from_command_line_options || from_defined_constants
  [framework, parallel_data].compact.join(" ")
end