Skip to content

Commit

Permalink
Adjusting the logic to install the CI::Reporter::TestUnit mediator so…
Browse files Browse the repository at this point in the history
… that it will work for newer ruby-test versions (>= 2.1) as well.
  • Loading branch information
amfranz authored and nicksieger committed Apr 19, 2011
1 parent d33a4e5 commit 388dc6e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/ci/reporter/rake/test_unit_loader.rb
Expand Up @@ -5,6 +5,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
Expand All @@ -19,3 +20,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

0 comments on commit 388dc6e

Please sign in to comment.