Skip to content

Instantly share code, notes, and snippets.

View mahnve's full-sized avatar

Marcus Ahnve mahnve

View GitHub Profile
@mahnve
mahnve / watchr script
Created May 9, 2011 07:43 — forked from markbates/watchr script
A Watchr script for rails, rspec, and cucumber
ENV["WATCHR"] = "1"
system 'clear'
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
puts message
image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'"
system %(#{growlnotify} #{options} &)