Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 September 24, 2010

Showing 1 changed file with 16 additions and 0 deletions. Show diff stats Hide diff stats

  1. 16  lib/ci/reporter/rake/test_unit_loader.rb
16  lib/ci/reporter/rake/test_unit_loader.rb
... ...
@@ -1,3 +1,4 @@
  1
+
1 2
 # Copyright (c) 2006-2010 Nick Sieger <nicksieger@gmail.com>
2 3
 # See the file LICENSE.txt included with the distribution for
3 4
 # software license details.
@@ -5,6 +6,7 @@
5 6
 $: << File.dirname(__FILE__) + "/../../.."
6 7
 require 'ci/reporter/test_unit'
7 8
 
  9
+# Intercepts mediator creation in ruby-test < 2.1
8 10
 module Test #:nodoc:all
9 11
   module Unit
10 12
     module UI
@@ -19,3 +21,17 @@ def create_mediator(suite)
19 21
     end
20 22
   end
21 23
 end
  24
+
  25
+# Intercepts mediator creation in ruby-test >= 2.1
  26
+module Test #:nodoc:all
  27
+  module Unit
  28
+    module UI
  29
+      class TestRunner
  30
+        def setup_mediator
  31
+          # swap in our custom mediator
  32
+          @mediator = CI::Reporter::TestUnit.new(@suite)
  33
+        end
  34
+      end
  35
+    end
  36
+  end
  37
+end

0 notes on commit 5d9ba36

Please sign in to comment.
Something went wrong with that request. Please try again.