[rspec-users] Autotest file

David Chelimsky dchelimsky at gmail.com
Thu Feb 28 16:12:00 EST 2008

On Thu, Feb 28, 2008 at 2:59 PM, Bryan Ray <bryansray at gmail.com> wrote:
> I'm using rSpec 1.1.3 and ZenTest 3.9.1 and every time I run a test I get
> "All Tests Passed" ... perhaps I should just leave it that way? :p
> Anyways, I've attempted to construct my own ~/.autotest file and it's
> extremely basic, but for some reason whenever I make one test fail (on
> purpose) it still kicks off the :green hook rather than the :red one ...

This is already fixed in trunk:

svn checkout http://rspec.rubyforge.org/svn/trunk
git clone git://gitorious.org/rspec/mainline.git

If you're using git you have to clone the whole repo and copy over the plugins.

> Anybody have any ideas?
> # My ~/.autotest file
> require 'autotest/redgreen'
> module Autotest::Growl
>   def self.growl(title, msg, image="", priority=0, sticky="")
>      system "growlnotify -n autotest #{sticky} --priority #{priority}
> --message '#{msg}' '#{title}'"
>   end
>   Autotest::add_hook :green do |at|
>     growl "Tests Passed!", "All tests passed!"
>    end
>   Autotest::add_hook :red do |at|
>     growl "Tests Failed!", "Tests have failed!"
>   end
> end
> --
> Bryan Ray
> http://www.bryanray.net
> "Programming today is a race between software engineers striving to build
> bigger and better idiot-proof programs, and the Universe trying to produce
> bigger and better idiots. So far, the Universe is winning."
> _______________________________________________
>  rspec-users mailing list
>  rspec-users at rubyforge.org
>  http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list