Module: Retest::Output
- Defined in:
- lib/retest/output.rb
Overview
This library formats output messages displayed to the user
Class Method Summary collapse
-
.force_batch_failures(paths, out: nil) ⇒ Object
This method formats the force batch search failures and prints it to IO if passed in or returns the message otherwise.
Class Method Details
.force_batch_failures(paths, out: nil) ⇒ Object
This method formats the force batch search failures and prints it to IO if passed in or returns the message otherwise.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/retest/output.rb', line 8 def force_batch_failures(paths, out: nil) return unless paths&.any? output = "\n" output += "Retest could not find matching tests for these inputs:\n" paths.each do |invalid_path| output += " - #{invalid_path}\n" end output += "\n" if out out.puts output else output end end |