Skip to content

Commit

Permalink
Add test for #kill.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 8, 2024
1 parent 7ed4c47 commit cdc1a24
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/async/process/child.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,21 @@

expect(child).not.to be(:running?)
end

with "#kill" do
it "can kill child process" do
child = subject.new("sleep 60")

expect(child).to be(:running?)

child.kill

status = child.wait

expect(child).not.to be(:running?)

expect(status).to be_a(Process::Status)
expect(status).not.to be(:success?)
end
end
end

0 comments on commit cdc1a24

Please sign in to comment.