-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspecs.watchr
25 lines (21 loc) · 1000 Bytes
/
specs.watchr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Run me with:
#
# $ watchr specs.watchr
# --------------------------------------------------
# Watchr Rules
# --------------------------------------------------
watch( '^test.*/test_.*\.rb' ) { |m| system "ruby -rubygems -I.:lib %s" % m[0] }
watch( '^lib/redgreen/(.*)\.rb' ) { |m| system "rake -s test:by_fw FW=%s" % m[1] }
watch( '^lib/redgreen/testunit\.rb' ) { |m| system "rake -s test:by_fw FW=testunit,shoulda,context,contest" }
watch( '^lib/redgreen\.rb' ) { |m| system "rake -s test:all" }
watch( '^test/test_helper\.rb' ) { |m| system "rake -s test:all" }
# --------------------------------------------------
# Signal Handling
# --------------------------------------------------
# Ctrl-\
Signal.trap('QUIT') do
puts " --- Running all tests ---\n\n"
system "rake -s test:all"
end
# Ctrl-C
Signal.trap('INT') { abort("\n") }