class Minitest::Sound::Reporter
Public Class Methods
new(io = $stdout, options = {})
click to toggle source
Calls superclass method
# File lib/minitest/sound/reporter.rb, line 6 def initialize(io = $stdout, options = {}) super(io, options) @player = Minitest::Sound::Player.new( success: Minitest::Sound.success, failure: Minitest::Sound.failure, during_test: Minitest::Sound.during_test, ) end
Public Instance Methods
add_defaults(defaults)
click to toggle source
When using the following methods together with ‘minitest-reporters`, they are required.
# File lib/minitest/sound/reporter.rb, line 31 def add_defaults(defaults); end
after_test(test)
click to toggle source
# File lib/minitest/sound/reporter.rb, line 35 def after_test(test); end
before_test(test)
click to toggle source
# File lib/minitest/sound/reporter.rb, line 33 def before_test(test); end
report()
click to toggle source
Calls superclass method
# File lib/minitest/sound/reporter.rb, line 19 def report super @player.stop_during_test_sound test_success? ? @player.play_success_sound : @player.play_failure_sound end
start()
click to toggle source
Calls superclass method
# File lib/minitest/sound/reporter.rb, line 14 def start super @player.play_during_test_sound end
test_success?()
click to toggle source
# File lib/minitest/sound/reporter.rb, line 25 def test_success? errors == 0 && failures == 0 end