Skip to content

Commit

Permalink
Expand Kernel::system tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Nov 5, 2024
1 parent 9639048 commit 1c70c17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@

with "#system" do
it "can execute child process" do
# expect(reactor).to receive(:process_wait)
expect(reactor).to receive(:process_wait)

::Kernel.system("true")
result = ::Kernel.system("true")

expect(result).to be == true
expect($?).to be(:success?)
end

it "can fail to execute child process" do
expect(reactor).to receive(:process_wait)

result = ::Kernel.system("does-not-exist")

expect(result).to be == nil
Expand Down

0 comments on commit 1c70c17

Please sign in to comment.