.watchr in riot_notifier-0.0.7 vs .watchr in riot_notifier-0.0.8
- old
+ new
@@ -1,21 +1,15 @@
+#!/usr/bin/env watchr
-def run(*args)
- system "ruby -rubygems -Ilib:test #{args.join(' ')}"
+begin
+ require File.join(ENV["HOME"], ".watchr.test.rb")
+rescue LoadError
+ warn "Unable to load #{File.join(ENV["HOME"], ".watchr.test.rb")}"
+ warn "You might try this: http://gist.github.com/raw/273574/8804dff44b104e9b8706826dc8882ed985b4fd13/.watchr.test.rb"
+ exit
end
-def run_tests
- system "rake test"
-end
-
-def underscore(file)
- file.gsub('/', '_')
-end
-
watch('test/test_.*\.rb') {|md| run md[0] }
-watch('lib/(.*)\.rb') {|md| run "test/test_#{underscore(md[1])}.rb" }
+watch('lib/(.*)\.rb') { run_tests }
watch('test/helper.rb') { run_tests }
run_tests
-
-Signal.trap("QUIT") { abort("\n") }
-Signal.trap("INT") { run_tests }