Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adjusting the logic to install the CI::Reporter::TestUnit mediator so…

… that it will work for newer ruby-test versions (>= 2.1) as well.
  • Loading branch information...
commit 5d9ba3604f8b1f26b393b5b47107730bd10d24c6 1 parent 305d5da
Michael Franz Aigner authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 lib/ci/reporter/rake/test_unit_loader.rb
16 lib/ci/reporter/rake/test_unit_loader.rb
View
@@ -1,3 +1,4 @@
+
# Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
# See the file LICENSE.txt included with the distribution for
# software license details.
@@ -5,6 +6,7 @@
$: << File.dirname(__FILE__) + "/../../.."
require 'ci/reporter/test_unit'
+# Intercepts mediator creation in ruby-test < 2.1
module Test #:nodoc:all
module Unit
module UI
@@ -19,3 +21,17 @@ def create_mediator(suite)
end
end
end
+
+# Intercepts mediator creation in ruby-test >= 2.1
+module Test #:nodoc:all
+ module Unit
+ module UI
+ class TestRunner
+ def setup_mediator
+ # swap in our custom mediator
+ @mediator = CI::Reporter::TestUnit.new(@suite)
+ end
+ end
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.