lib/simplecov/command_guesser.rb
def from_defined_constants
        # If the command regexps fail, let's try checking defined constants.
        if defined?(RSpec)
          "RSpec"
        elsif defined?(Test::Unit)
          "Unit Tests"
        elsif defined?(Minitest)
          "Minitest"
        elsif defined?(MiniTest)
          "MiniTest"
        else
          # TODO: Provide link to docs/wiki article
          warn "SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'."
          "Unknown Test Framework"
        end
      end
# 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.
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.
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 .
def from_defined_constants
        if defined?(RSpec)
          "RSpec"
        elsif defined?(Test::Unit)
          "Unit Tests"
        elsif defined?(Minitest)
          "Minitest"
        elsif defined?(MiniTest)
          "MiniTest"
        else
          warn "SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'."
          "Unknown Test Framework"
        end
      end
def from_defined_constants if defined? ( RSpec ) "RSpec" elsif defined? ( Test :: Unit ) "Unit Tests" elsif defined? ( Minitest ) "Minitest" elsif defined? ( MiniTest ) "MiniTest" else warn "SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'." "Unknown Test Framework" end end
Storage for the original command line call that invoked the test suite.
Storage for the original command line call that invoked the test suite .
# If the command regexps fail, let's try checking defined constants. # TODO: Provide link to docs/wiki article