Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v1.0.2
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (21 sloc) 0.525 kb
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
passed = message.include?('0 failures, 0 errors')
severity = passed ? "-1" : "1"
options = "-w -n Watchr"
options << " -m '#{message}' '#{title}' -p #{severity}"
system %(#{growlnotify} #{options} &)
end
def run_all_tests
system('clear')
result = `rake test`
growl result.split("\n")[-3] rescue nil
puts result
end
watch("test/derp_test\.rb") do
run_all_tests
end
watch("lib/derp\.rb") do
run_all_tests
end
Jump to Line
Something went wrong with that request. Please try again.