rust-ruby-wrap-data/.watchr -rw-r--r-- 253 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
require 'open3'

def compile
  puts
  puts '========================================='
  puts
  _, stdout, wait_thr = Open3.popen2('cargo test')
  print stdout.getc until stdout.eof?
  wait_thr.value.success?
end

watch('^src/.*|^test\.rb') { compile }