Microtest
Inherits Microtest::GlobalHookDSL
Constants
BACKTRACE_LINE_REGEX = {% if flag?(:msvc) %}
/\A(?<file>.+):(?<line>\d+) in \'(?<func>\S+)\'\z/
{% else %}
/\A(?<file>.+):(?<line>\d+):(?<column>\d+) in \'(?<func>\S+)\'\z/
{% end %}
e.g.: "spec/spec_helper.cr:64:1 in '__crystal_main'" (backtraces on MSVC do not have column numbers)
COMMON_REPORTERS = [ErrorListReporter.new, SlowTestsReporter.new, SummaryReporter.new] of Reporter
CRYSTAL_DIR = find_crystal_root_path
CYAN = RGB.new(0, 205, 205)
DARK_GRAY = RGB.new(100, 100, 100)
GREEN = RGB.new(0, 220, 0)
LIGHT_BLUE = RGB.new(90, 90, 250)
LIGHT_GRAY = RGB.new(200, 200, 200)
LIGHT_MAGENTA = RGB.new(220, 0, 220)
MAGENTA = RGB.new(205, 0, 205)
MEHTOD_SEPARATOR = "#"
PROJECT_DIR = Dir.current
PROJECT_LIB_DIR = File.join(PROJECT_DIR, "lib")
PROJECT_SPEC_DIR = File.join(PROJECT_DIR, "spec")
PROJECT_SRC_DIR = File.join(PROJECT_DIR, "src")
RED = RGB.new(220, 0, 0)
VERSION = {{ (`shards version /tmp/tmp.ObFIDM/src/src/microtest`).strip.stringify }}
WHITE = RGB.new(255, 255, 255)
YELLOW = RGB.new(220, 220, 0)
Class methods
fetch_seed
Sourcefind_crystal_root_path
Sourcepower_assert_formatter
Sourcerun(reporters, random_seed = fetch_seed)
Sourcerun!(*args)
SourceNested types
- Microtest::AbortionInfo
- Microtest::AssertionFailure
- Microtest::BacktracePrinter
- Microtest::DSL
- Microtest::DefaultRunner
- Microtest::DescriptionReporter
- Microtest::ErrorListReporter
- Microtest::ExecutionContext
- Microtest::Formatter
- Microtest::GlobalHookDSL
- Microtest::JsonSummaryReporter
- Microtest::PowerAssert
- Microtest::ProgressReporter
- Microtest::RGB
- Microtest::Reporter
- Microtest::Runner
- Microtest::SkipException
- Microtest::SlowTestsReporter
- Microtest::StringUtils
- Microtest::SummaryReporter
- Microtest::Termart
- Microtest::TerminalReporter
- Microtest::Test
- Microtest::TestAbortion
- Microtest::TestClassDSL
- Microtest::TestException
- Microtest::TestFailure
- Microtest::TestMethod
- Microtest::TestResult
- Microtest::TestSkip
- Microtest::TestSuccess
- Microtest::UnexpectedError