Class: Ace::TestRunner::Suite::SimpleDisplayManager
- Inherits:
-
Object
- Object
- Ace::TestRunner::Suite::SimpleDisplayManager
- Includes:
- DisplayHelpers
- Defined in:
- lib/ace/test_runner/suite/simple_display_manager.rb
Overview
SimpleDisplayManager provides line-by-line output without ANSI cursor control. This is the default display mode, optimized for piping and agent consumption.
Unlike DisplayManager which uses ANSI escape codes to update lines in place, SimpleDisplayManager simply prints one line per package as it completes.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#packages ⇒ Object
readonly
Returns the value of attribute packages.
-
#start_time ⇒ Object
readonly
Returns the value of attribute start_time.
Instance Method Summary collapse
-
#initialize(packages, config) ⇒ SimpleDisplayManager
constructor
A new instance of SimpleDisplayManager.
-
#initialize_display ⇒ Object
Print initial message showing how many packages will run.
-
#refresh ⇒ Object
No-op for simple mode - we don’t need live updates.
-
#show_final_results ⇒ Object
No-op for simple mode - results already printed as packages complete.
-
#show_summary(summary) ⇒ Object
Display the summary section using shared helpers.
-
#update_package(package, status, _output = nil) ⇒ Object
Called when a package status changes.
Methods included from DisplayHelpers
Constructor Details
#initialize(packages, config) ⇒ SimpleDisplayManager
Returns a new instance of SimpleDisplayManager.
18 19 20 21 22 23 24 25 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 18 def initialize(packages, config) @packages = packages @config = config @package_status = {} @start_time = Time.now @use_color = config.dig("test_suite", "display", "color") != false @package_width = calculate_package_width end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
16 17 18 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 16 def config @config end |
#packages ⇒ Object (readonly)
Returns the value of attribute packages.
16 17 18 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 16 def packages @packages end |
#start_time ⇒ Object (readonly)
Returns the value of attribute start_time.
16 17 18 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 16 def start_time @start_time end |
Instance Method Details
#initialize_display ⇒ Object
Print initial message showing how many packages will run
28 29 30 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 28 def initialize_display puts "Running tests for #{@packages.size} packages..." end |
#refresh ⇒ Object
No-op for simple mode - we don’t need live updates
43 44 45 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 43 def refresh # Intentionally empty - simple mode doesn't refresh end |
#show_final_results ⇒ Object
No-op for simple mode - results already printed as packages complete
48 49 50 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 48 def show_final_results # Intentionally empty - completion lines already printed in update_package end |
#show_summary(summary) ⇒ Object
Display the summary section using shared helpers
53 54 55 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 53 def show_summary(summary) render_summary(summary, @start_time, separator) end |
#update_package(package, status, _output = nil) ⇒ Object
Called when a package status changes. Prints a line when package completes.
33 34 35 36 37 38 39 40 |
# File 'lib/ace/test_runner/suite/simple_display_manager.rb', line 33 def update_package(package, status, _output = nil) @package_status[package["name"]] = status # Only print when package completes return unless status[:completed] print_completion_line(package, status) end |