Class: GrowlGlue::Autotest

Inherits:
Object
  • Object
show all
Defined in:
lib/growl_glue/autotest.rb

Constant Summary collapse

ERROR_PRI =
2

Class Method Summary collapse

Class Method Details

.initialize {|@config| ... } ⇒ Object

Yields:

  • (@config)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/growl_glue/autotest.rb', line 7

def self.initialize
  @config = Config.new
  
  @config.sound :location => "/System/Library/Sounds/"
  @config.commands :safe_growlnotify => File.join(gem_home_dir, "lib", "bin", "growl_notify.sh")
  
  [:failure, :success, :pending].each do |status|
    @config.image status => File.join(gem_home_dir, "lib", "img", "#{status}.png")
  end
  
  @config.title :success => "Tests Passed"
  @config.title :pending => "Tests Passed, Some Pending"
  @config.title :failure => "Tests Failed"
  
  yield @config if block_given?
  
  add_hook
end