summaryrefslogtreecommitdiff
path: root/test/io/console/test_io_console.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r--test/io/console/test_io_console.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 27d8e4a988..ea23db5b4b 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -49,6 +49,14 @@ class TestIO_Console < Test::Unit::TestCase
assert_include(e.message, IO::NULL)
end
end
+
+ def test_bad_keyword
+ assert_raise_with_message(ArgumentError, /unknown keyword:.*bad/) do
+ File.open(IO::NULL) do |f|
+ f.raw(bad: 0)
+ end
+ end
+ end
end
defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do