Permalink
Browse files

Import initial code

  • Loading branch information...
0 parents commit c610ec4c2f744847fc69de321b3b03fe79e7f677 @gregbell committed Mar 5, 2010
Showing with 24 additions and 0 deletions.
  1. +24 −0 lib/spec_music_formatter.rb
  2. BIN sounds/0.aif
  3. BIN sounds/1.aif
  4. BIN sounds/2.aif
@@ -0,0 +1,24 @@
+require 'spec/runner/formatter/progress_bar_formatter'
+
+
+class SpecMusicFormatter < Spec::Runner::Formatter::ProgressBarFormatter
+
+ SOUNDS_PATH = File.expand_path("#{File.dirname(__FILE__)}/../sounds")
+ puts SOUNDS_PATH
+
+ def example_failed(example, counter, failure)
+ super
+ end
+
+ def example_passed(example)
+ @count ||= 0
+ system("/usr/bin/afplay #{SOUNDS_PATH}/#{@count % 3}.aif")
+ super
+ @count += 1
+ end
+
+ def example_pending(example, message, deprecated_pending_location=nil)
+ super
+ end
+
+end
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit c610ec4

Please sign in to comment.