Class: Tork::Driver

Inherits:
Server show all
Defined in:
lib/tork/driver.rb

Constant Summary collapse

REABSORB_FILE_GREPS =
[]
ALL_TEST_FILE_GLOBS =
[]
TEST_FILE_GLOBBERS =
{}

Instance Method Summary collapse

Methods inherited from Server

address, #quit

Constructor Details

#initializeDriver

Returns a new instance of Driver.



14
15
16
17
# File 'lib/tork/driver.rb', line 14

def initialize
  super
  Tork.config :driver
end

Instance Method Details

#loopObject



19
20
21
22
23
24
25
26
# File 'lib/tork/driver.rb', line 19

def loop
  @herald = popen('tork-herald')
  @engine = popen('tork-engine')
  super
ensure
  pclose @herald
  pclose @engine
end

#test!Object



28
29
30
31
32
33
34
35
36
# File 'lib/tork/driver.rb', line 28

def test!
  test_files_found = false
  Dir.glob(ALL_TEST_FILE_GLOBS) do |test_file|
    next if overhead_file? test_file
    test test_file
    test_files_found = true
  end
  tell @client, 'There are no test files to run.' unless test_files_found
end