Sha256: e3f6c57d893390f3bca3234b79fd4e62ea12e2ec9fa6085def6dc2b6e9c96f7f
Contents?: true
Size: 1.24 KB
Versions: 12
Compression:
Stored size: 1.24 KB
Contents
require File.dirname(__FILE__) + '/test_helper.rb' class TestAutotestNotification < Test::Unit::TestCase def setup @title = "title" @msg = "message" @image = "image" @priority = 0 @total = 0 @failures = 0 %w( DOOM_EDITION SPEAKING STICKY BUUF ).each do |c| AutotestNotification.const_set(c.to_sym, false) unless AutotestNotification.const_defined?(c.to_sym) end end def test_notify_when_os_is_cygwin AutotestNotification::Cygwin.expects(:notify).with(@title, @msg, @image, @total, @failures) verify_to("cygwin") end def test_notify_when_os_is_windows AutotestNotification::Windows.expects(:notify).with(@title, @msg, @image) verify_to("mswin") end def test_notify_when_os_is_linux AutotestNotification::Linux.expects(:notify).with(@title, @msg, @image, @total, @failures, @priority) verify_to("linux") end def test_notify_when_os_is_mac AutotestNotification::Mac.expects(:notify).with(@title, @msg, @image, @total, @failures, @priority) verify_to("darwin") end private def verify_to(so) AutotestNotification.const_set :RUBY_PLATFORM, so AutotestNotification.notify(@title, @msg, @image, @total, @failures, @priority) end end
Version data entries
12 entries across 12 versions & 4 rubygems