Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f450a780d8
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.61 kb
def growl(title, message)
growlnotify = `which growlnotify`.chomp
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.jpg" : "~/.watchr_images/failed.jpg"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'"
system %(#{growlnotify} #{options} &)
end
def run_test_file(file)
system('clear')
result = `rake test TEST=#{file}`
growl file, result.split("\n").last rescue nil
puts result
end
watch("test/test_.*\.rb") {|match| run_test_file(match[0])}
watch("lib/test/right/(.*)\.rb") {|match| run_test_file("test/test_#{match[1]}.rb")}
Jump to Line
Something went wrong with that request. Please try again.