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'
|
||||||
require 'test/unit/testresult'
|
require 'test/unit/testresult'
|
||||||
|
Test::Unit.run = true
|
||||||
|
|
||||||
module Hydra #:nodoc:
|
module Hydra #:nodoc:
|
||||||
# Hydra class responsible for running test files.
|
# Hydra class responsible for running test files.
|
||||||
#
|
#
|
||||||
|
@ -16,8 +18,6 @@ module Hydra #:nodoc:
|
||||||
def initialize(opts = {})
|
def initialize(opts = {})
|
||||||
@io = opts.fetch(:io) { raise "No IO Object" }
|
@io = opts.fetch(:io) { raise "No IO Object" }
|
||||||
@verbose = opts.fetch(:verbose) { false }
|
@verbose = opts.fetch(:verbose) { false }
|
||||||
|
|
||||||
Test::Unit.run = true
|
|
||||||
$stdout.sync = true
|
$stdout.sync = true
|
||||||
trace 'Booted. Sending Request for file'
|
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__))
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
||||||
require 'hydra'
|
require 'hydra'
|
||||||
|
|
||||||
|
# Since Hydra turns off testing, we have to turn it back on
|
||||||
|
Test::Unit.run = false
|
||||||
|
|
||||||
class Test::Unit::TestCase
|
class Test::Unit::TestCase
|
||||||
def target_file
|
def target_file
|
||||||
File.expand_path(File.join(Dir.tmpdir, 'hydra_test.txt'))
|
File.expand_path(File.join(Dir.tmpdir, 'hydra_test.txt'))
|
||||||
|
|
Loading…
Reference in New Issue