Sha256: a166f5fe581633369f2a92f36bc4931ef9e6edbdb02455c531702bb3761434c8

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper.rb'

class TestMac < Test::Unit::TestCase

  def test_notify_without_voice_or_noise
    Object.const_set :SPEAKING, false    
    AutotestNotification::Mac.expects(:system).with("growlnotify -n autotest --image image -p 0 -m 'msg' title")
    AutotestNotification::Mac.notify("title", "msg", "image", 1)
  end

  def test_notify_with_voice_only
    Object.const_set :SPEAKING, true    
    AutotestNotification::Mac.expects(:system).with("growlnotify -n autotest --image image -p 0 -m 'msg' title")
    AutotestNotification::Mac.expects(:system).with("say 1 test failed.")
    AutotestNotification::Mac.notify("title", "msg", "image", 1)
  end

  

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notch8-autotest-notification-1.2.0 test/autotest_notification/test_mac.rb