dia 1.5 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +0,0 @@
1
- BareTest.suite 'Dia::Sandbox#terminate', :tags => [ :terminate ] do
2
-
3
- assert 'A spawned sandbox will be terminated with the #terminate method' do
4
- sandbox = Dia::Sandbox.new(Dia::Profiles::NO_OS_SERVICES) do
5
- sleep(100)
6
- end
7
-
8
- sandbox.run
9
- sandbox.terminate
10
- sleep(1) # Allow the process time to die ..
11
-
12
- begin
13
- Process.kill('SIGKILL', sandbox.pid)
14
- false
15
- rescue Errno::ESRCH => e
16
- true
17
- end
18
-
19
- end
20
-
21
- assert("nil will be returned if Dia::Sandbox#run hasn't been called before a call to #terminate") do
22
- sandbox = Dia::Sandbox.new(Dia::Profiles::NO_INTERNET) do
23
- # ...
24
- end
25
-
26
- equal(nil, sandbox.terminate)
27
- end
28
-
29
- end