Sha256: 6c2cd8041cd02c7839c49fc5292402c8d87e92372240f6969b1ddc87d10f5f76
Contents?: true
Size: 1.23 KB
Versions: 17
Compression:
Stored size: 1.23 KB
Contents
# Run me with: # # $ watchr specs.watchr # -------------------------------------------------- # Convenience Methods # -------------------------------------------------- def run(cmd) puts(cmd) system(cmd) end def run_all_tests # see Rakefile for the definition of the test:all task system( "rake -s test:all VERBOSE=true" ) end # -------------------------------------------------- # Watchr Rules # -------------------------------------------------- watch( '^test.*/test_.*\.rb' ) { |m| run( "ruby -rubygems %s" % m[0] ) } watch( '^lib/(.*)\.rb' ) { |m| run( "ruby -rubygems test/test_%s.rb" % m[1] ) } watch( '^lib/watchr/(.*)\.rb' ) { |m| run( "ruby -rubygems test/test_%s.rb" % m[1] ) } watch( '^lib/watchr/event_handlers/(.*)\.rb' ) { |m| run( "ruby -rubygems test/event_handlers/test_%s.rb" % m[1] ) } watch( '^test/test_helper\.rb' ) { run_all_tests } # -------------------------------------------------- # Signal Handling # -------------------------------------------------- # Ctrl-\ Signal.trap('QUIT') do puts " --- Running all tests ---\n\n" run_all_tests end # Ctrl-C Signal.trap('INT') { abort("\n") }
Version data entries
17 entries across 17 versions & 3 rubygems