summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_exception.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index a26ade075b..52dd4665a1 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -296,13 +296,25 @@ end.join
exit
rescue SystemExit => e
end
- assert(e.success?)
+ assert_send([e, :success?], "success by default")
+
+ begin
+ exit(true)
+ rescue SystemExit => e
+ end
+ assert_send([e, :success?], "true means success")
+
+ begin
+ exit(false)
+ rescue SystemExit => e
+ end
+ assert_not_send([e, :success?], "false means failure")
begin
abort
rescue SystemExit => e
end
- assert(!e.success?)
+ assert_not_send([e, :success?], "abort means failure")
end
def test_nomethoderror