Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (20 sloc) 0.404 kB
require 'em_test_helper'
class TestShutdownHooks < Test::Unit::TestCase
def test_shutdown_hooks
r = false
EM.run {
EM.add_shutdown_hook { r = true }
EM.stop
}
assert_equal( true, r )
end
def test_hook_order
r = []
EM.run {
EM.add_shutdown_hook { r << 2 }
EM.add_shutdown_hook { r << 1 }
EM.stop
}
assert_equal( [1, 2], r )
end
end
Jump to Line
Something went wrong with that request. Please try again.