File: test_handlers_kqueue_handler.rb

package info (click to toggle)
ruby-god 0.12.1-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 752 kB
  • sloc: ruby: 5,913; ansic: 217; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 428 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require File.dirname(__FILE__) + '/helper'

if God::EventHandler.event_system == "kqueue"

  class TestHandlersKqueueHandler < Test::Unit::TestCase
    def test_register_process
      KQueueHandler.expects(:monitor_process).with(1234, 2147483648)
      KQueueHandler.register_process(1234, [:proc_exit])
    end

    def test_events_mask
      assert_equal 2147483648, KQueueHandler.events_mask([:proc_exit])
    end
  end

end