summaryrefslogtreecommitdiff
path: root/spec/ruby/core/process/status/to_i_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/process/status/to_i_spec.rb')
-rw-r--r--spec/ruby/core/process/status/to_i_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/ruby/core/process/status/to_i_spec.rb b/spec/ruby/core/process/status/to_i_spec.rb
index 37b7bdb1e4..a284f64f86 100644
--- a/spec/ruby/core/process/status/to_i_spec.rb
+++ b/spec/ruby/core/process/status/to_i_spec.rb
@@ -1,5 +1,13 @@
require_relative '../../../spec_helper'
describe "Process::Status#to_i" do
- it "needs to be reviewed for spec completeness"
+ it "returns an integer when the child exits" do
+ ruby_exe('exit 48')
+ $?.to_i.should be_an_instance_of(Integer)
+ end
+
+ it "returns an integer when the child is signaled" do
+ ruby_exe('raise SignalException, "TERM"')
+ $?.to_i.should be_an_instance_of(Integer)
+ end
end