Class: DeepTest::Test::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/deep_test/test/runner.rb

Constant Summary collapse

NO_FILTERS =
Object.new.instance_eval do
  def filters; []; end;
  self
end

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



11
12
13
# File 'lib/deep_test/test/runner.rb', line 11

def initialize(options)
  @options = options
end

Instance Method Details

#process_work_units(server) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/deep_test/test/runner.rb', line 15

def process_work_units(server)
  suite = ::Test::Unit::AutoRunner::COLLECTORS[@options.test_collector].call NO_FILTERS
  supervised_suite = DeepTest::Test::SupervisedTestSuite.new(suite, server)
  require 'test/unit/ui/console/testrunner'
  result = ::Test::Unit::UI::Console::TestRunner.run(supervised_suite, ::Test::Unit::UI::NORMAL)
  result.passed?
end