Test: Skip within_sandbox on JRuby.

Add a test for repeated enter!
This commit is contained in:
Thomas Hurst 2017-05-24 16:13:36 +01:00
parent d305efab9f
commit 2c8fcd66a3

View file

@ -9,6 +9,8 @@ class CapsicumTest < Minitest::Test
end
def test_1_within_sandbox
skip if RUBY_ENGINE == 'jruby' # fork not supported
refute Capsicum.sandboxed?
result = Capsicum.within_sandbox do
@ -30,6 +32,7 @@ class CapsicumTest < Minitest::Test
def test_2_capsicum
refute Capsicum.sandboxed?
assert Capsicum.enter!
assert Capsicum.enter!
assert Capsicum.sandboxed?
assert_raises(Errno::ECAPMODE) do