Properly disabling Test::Unit autorun on exit so it won't display extra results
This commit is contained in:
parent
df1afee41b
commit
26d3fe6781
|
@ -1,5 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'test/unit/testresult'
|
||||
Test::Unit.run = true
|
||||
|
||||
module Hydra #:nodoc:
|
||||
# Hydra class responsible for running test files.
|
||||
#
|
||||
|
@ -15,9 +17,7 @@ module Hydra #:nodoc:
|
|||
# parent) to send it messages on which files to execute.
|
||||
def initialize(opts = {})
|
||||
@io = opts.fetch(:io) { raise "No IO Object" }
|
||||
@verbose = opts.fetch(:verbose) { false }
|
||||
|
||||
Test::Unit.run = true
|
||||
@verbose = opts.fetch(:verbose) { false }
|
||||
$stdout.sync = true
|
||||
trace 'Booted. Sending Request for file'
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|||
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
||||
require 'hydra'
|
||||
|
||||
# Since Hydra turns off testing, we have to turn it back on
|
||||
Test::Unit.run = false
|
||||
|
||||
class Test::Unit::TestCase
|
||||
def target_file
|
||||
File.expand_path(File.join(Dir.tmpdir, 'hydra_test.txt'))
|
||||
|
|
Loading…
Reference in New Issue