summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/system_exit_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/system_exit_spec.rb')
-rw-r--r--spec/ruby/core/exception/system_exit_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/exception/system_exit_spec.rb b/spec/ruby/core/exception/system_exit_spec.rb
index 5c6116576b..eef9faf271 100644
--- a/spec/ruby/core/exception/system_exit_spec.rb
+++ b/spec/ruby/core/exception/system_exit_spec.rb
@@ -3,14 +3,14 @@ require_relative '../../spec_helper'
describe "SystemExit" do
it "sets the exit status and exits silently when raised" do
code = 'raise SystemExit.new(7)'
- result = ruby_exe(code, args: "2>&1")
+ result = ruby_exe(code, args: "2>&1", exit_status: 7)
result.should == ""
$?.exitstatus.should == 7
end
it "sets the exit status and exits silently when raised when subclassed" do
code = 'class CustomExit < SystemExit; end; raise CustomExit.new(8)'
- result = ruby_exe(code, args: "2>&1")
+ result = ruby_exe(code, args: "2>&1", exit_status: 8)
result.should == ""
$?.exitstatus.should == 8
end