summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAbinoam P. Marques Jr <abinoam@gmail.com>2017-09-24 23:51:32 -0300
committerAbinoam P. Marques Jr <abinoam@gmail.com>2017-09-25 06:51:01 -0300
commit4c37fca6e52c4ede457565fab88902debfe9a1ca (patch)
tree0a3e6be25a6e4f593a7339d0f65428b4e1d5a458 /test
parentf967b788d640a31eccf0a6de3233d81db642d433 (diff)
downloadhighline-4c37fca6e52c4ede457565fab88902debfe9a1ca.tar.gz
Fix rescueing without error class
Diffstat (limited to 'test')
-rw-r--r--test/acceptance/acceptance.rb4
-rwxr-xr-xtest/test_highline.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/acceptance/acceptance.rb b/test/acceptance/acceptance.rb
index 9867b55..508b0f6 100644
--- a/test/acceptance/acceptance.rb
+++ b/test/acceptance/acceptance.rb
@@ -38,12 +38,12 @@ HighLine::VERSION: #{HighLine::VERSION}
Terminal: #{HighLine.default_instance.terminal.class}
RUBY_DESCRIPTION: #{begin
RUBY_DESCRIPTION
- rescue
+ rescue NameError
'not available'
end}
Readline::VERSION: #{begin
Readline::VERSION
- rescue
+ rescue NameError
'not availabe'
end}
ENV['SHELL']: #{ENV['SHELL']}
diff --git a/test/test_highline.rb b/test/test_highline.rb
index eca4670..6f4d1e0 100755
--- a/test/test_highline.rb
+++ b/test/test_highline.rb
@@ -1645,7 +1645,7 @@ class TestHighLine < Minitest::Test
require "highline/import"
# this will still blow up, nothing available
ask("And now? ")
- rescue
+ rescue StandardError
# but HighLine's safe guards are off
refute_equal(EOFError, $ERROR_INFO.class)
end