summaryrefslogtreecommitdiff
path: root/test/ruby/test_file.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_file.rb')
-rw-r--r--test/ruby/test_file.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index 4a1f03cb005..41debbbb1c6 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -339,8 +339,9 @@ class TestFile < Test::Unit::TestCase
end
def test_file_open_double_mode
- e = assert_raise(ArgumentError) { File.open("a", 'w', :mode => 'rw+') }
- assert_equal 'mode specified twice', e.message
+ assert_raise_with_message(ArgumentError, 'mode specified twice') {
+ File.open("a", 'w', :mode => 'rw+')
+ }
end
def test_conflicting_encodings