Class: RspecRunner::Monitor

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_runner/monitor.rb

Class Method Summary collapse

Class Method Details

.startObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rspec_runner/monitor.rb', line 7

def start
  RspecRunner::Server.start

  at_exit { stop }

  watcher_thread = Watcher.start do |changes|
    puts 'Restarting...'
    RspecRunner::Server.restart
  end

  watcher_thread.join
  sleep 10_000 while true # :(
end