Browse files

adding autotest jam for meow

  • Loading branch information...
1 parent 79c4efa commit 3601fb79b4cb64e8cef2e4d095b66d085c0a89de @tenderlove committed Oct 28, 2008
Showing with 26 additions and 0 deletions.
  1. +3 −0 .autotest
  2. +23 −0 lib/meow/autotest.rb
View
3 .autotest
@@ -0,0 +1,3 @@
+$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
+
+require 'meow/autotest'
View
23 lib/meow/autotest.rb
@@ -0,0 +1,23 @@
+require 'meow'
+
+class Meow
+ class Autotest
+ @@meow = Meow.new('Meow Autotest')
+
+ ::Autotest.add_hook :initialize do |at|
+ @@meow.notify "Autotest", 'started'
+ end
+
+ ::Autotest.add_hook :red do |at|
+ @@meow.notify "Autotest", "#{at.files_to_test.size} test are fail."
+ end
+
+ ::Autotest.add_hook :green do |at|
+ @@meow.notify "Autotest", "Tests pass!" if at.tainted
+ end
+
+ ::Autotest.add_hook :all_good do |at|
+ @@meow.notify "Autotest", "All tests pass!" if at.tainted
+ end
+ end
+end

0 comments on commit 3601fb7

Please sign in to comment.