summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process/status/equal_value_spec.rb
blob: 444ce1775b57a0fceb1bbe4bf58ad2e0fb09f58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative '../../../spec_helper'

describe "Process::Status#==" do
  it "returns true when compared to the integer status of an exited child" do
    ruby_exe("exit(29)")
    $?.to_i.should == $?
    $?.should == $?.to_i
  end

  it "returns true when compared to the integer status of a terminated child" do
    ruby_exe("Process.kill(:KILL, $$); exit(29)")
    $?.to_i.should == $?
    $?.should == $?.to_i
  end
end