Sha256: 755c39b1c2269b0f2808efbb918b8afc43cb3490fd868504bee4eb4463085a05
Contents?: true
Size: 959 Bytes
Versions: 9
Compression:
Stored size: 959 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper.rb' class TestAutotestNotification < Test::Unit::TestCase def setup @title = "title" @msg = "message" @image = "image" @pri = 1 end def test_notify_when_os_is_cygwin AutotestNotification::Cygwin.expects(:notify).with(@title, @msg, @image) 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,@pri) verify_to("linux") end def test_notify_when_os_is_mac AutotestNotification::Mac.expects(:notify).with(@title, @msg, @image, @pri, 0) verify_to("darwin") end private def verify_to(so) AutotestNotification.const_set("RUBY_PLATFORM", so) AutotestNotification.notify(@title, @msg, @image, @pri) end end
Version data entries
9 entries across 9 versions & 4 rubygems