Sha256: 328c523ef39e5a92f92d3cf113dd7f7689442fd3c6401e537885b2d8684ae570
Contents?: true
Size: 738 Bytes
Versions: 12
Compression:
Stored size: 738 Bytes
Contents
require "test_notifier" require "test/unit/ui/console/testrunner" class Test::Unit::UI::Console::TestRunner alias finished_original finished def finished(elapsed_time) finished_original(elapsed_time) begin re = /(\d+) tests, (\d+) assertions, (\d+) failures, (\d+) errors/ _, tests, assertions, failures, errors = *@result.to_s.match(re) return if tests.to_i.zero? stats = TestNotifier::Stats.new(:test_unit, { :count => tests, :assertions => assertions, :failures => failures, :errors => errors }) TestNotifier.notify(:status => stats.status, :message => stats.message) rescue => e puts e puts e.backtrace end end end
Version data entries
12 entries across 12 versions & 1 rubygems