Sha256: 48a0a624bbdb8b1b0157f6e71b720da1b0aa390f7b54e78100b40cda5877f94e
Contents?: true
Size: 650 Bytes
Versions: 121
Compression:
Stored size: 650 Bytes
Contents
require 'em_test_helper' class TestSomeExceptions < Test::Unit::TestCase # Read the commentary in EM#run. # This test exercises the ensure block in #run that makes sure # EM#release_machine gets called even if an exception is # thrown within the user code. Without the ensured call to release_machine, # the second call to EM#run will fail with a C++ exception # because the machine wasn't cleaned up properly. def test_a assert_raises(RuntimeError) { EM.run { raise "some exception" } } end def test_b assert_raises(RuntimeError) { EM.run { raise "some exception" } } end end
Version data entries
121 entries across 120 versions & 8 rubygems