Class: Test::Unit::UI::Console::TestRunner
- Inherits:
-
TestRunner
- Object
- TestRunner
- Test::Unit::UI::Console::TestRunner
- Includes:
- OutputLevel
- Defined in:
- lib/test/unit/ui/console/testrunner.rb
Overview
Runs a Test::Unit::TestSuite on the console.
Direct Known Subclasses
Constant Summary collapse
- N_REPORT_SLOW_TESTS =
5
Constants included from OutputLevel
OutputLevel::IMPORTANT_FAULTS_ONLY, OutputLevel::NORMAL, OutputLevel::PROGRESS_ONLY, OutputLevel::SILENT, OutputLevel::VERBOSE
Instance Attribute Summary
Attributes inherited from TestRunner
Instance Method Summary collapse
-
#initialize(suite, options = {}) ⇒ TestRunner
constructor
Creates a new TestRunner for running the passed suite.
Methods inherited from TestRunner
Methods included from TestRunnerUtilities
#run, #start_command_line_test
Constructor Details
#initialize(suite, options = {}) ⇒ TestRunner
Creates a new TestRunner for running the passed suite. If quiet_mode is true, the output while running is limited to progress dots, errors and failures, and the final result. io specifies where runner output should go to; defaults to STDOUT.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/test/unit/ui/console/testrunner.rb', line 40 def initialize(suite, ={}) super @on_github_actions = (ENV["GITHUB_ACTIONS"] == "true") @output_level = @options[:output_level] || guess_output_level @output = @options[:output] || STDOUT @use_color = @options[:use_color] @use_color = guess_color_availability if @use_color.nil? @color_scheme = @options[:color_scheme] || ColorScheme.default @reset_color = Color.new("reset") @progress_style = @options[:progress_style] || guess_progress_style @progress_marks = ["|", "/", "-", "\\", "|", "/", "-", "\\"] @progress_mark_index = 0 @progress_row = 0 @progress_row_max = @options[:progress_row_max] @progress_row_max ||= guess_progress_row_max @show_detail_immediately = @options[:show_detail_immediately] @show_detail_immediately = true if @show_detail_immediately.nil? @already_outputted = false @indent = 0 @top_level = true @current_output_level = NORMAL @faults = [] @code_snippet_fetcher = CodeSnippetFetcher.new @test_suites = [] @test_statistics = [] end |