Class: GuardTestRunner

Inherits:
Test::Unit::UI::Console::TestRunner
  • Object
show all
Defined in:
lib/guard/test/guard_test_runner.rb

Overview

Thanks to Adam Sanderson for the really good starting point: endofline.wordpress.com/2008/02/11/a-custom-testrunner-to-scratch-an-itch/

This class inherits from Test::Unit’ standard console TestRunner I’m just overriding some callbacks methods to strip some outputs and display a notification on end

Instance Method Summary collapse

Constructor Details

#initialize(suite, options = {}) ⇒ GuardTestRunner

Returns a new instance of GuardTestRunner.



12
13
14
15
16
# File 'lib/guard/test/guard_test_runner.rb', line 12

def initialize(suite, options = {})
  super
  @color_scheme["pass"]    = ::Test::Unit::Color.new("green", foreground: true, bold: true)
  @color_scheme["failure"] = ::Test::Unit::Color.new("red", foreground: true, bold: true)
end