diff --git a/lib/hydra/runner.rb b/lib/hydra/runner.rb index ddacd6e..aa293cd 100644 --- a/lib/hydra/runner.rb +++ b/lib/hydra/runner.rb @@ -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' diff --git a/test/test_helper.rb b/test/test_helper.rb index 4fe607a..6f7260c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -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'))