Merge pull request #4246 from shuujii/use-assertion-methods-in-file-test

Use assertion methods in `File` test
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-01-25 22:46:12 +09:00
committed by GitHub
+10 -10
View File
@@ -1,18 +1,18 @@
##
# IO Test
assert('File', '15.2.21') do
File.class == Class
end
assert('File', '15.2.21.2') do
File.superclass == IO
end
# File Test
assert('File TEST SETUP') do
MRubyIOTestUtil.io_test_setup
end
assert('File', '15.2.21') do
assert_equal Class, File.class
end
assert('File', '15.2.21.2') do
assert_equal IO, File.superclass
end
assert('File#initialize', '15.2.21.4.1') do
io = File.open($mrbtest_io_rfname, "r")
assert_nil io.close
@@ -27,7 +27,7 @@ assert('File#path', '15.2.21.4.2') do
assert_equal $mrbtest_io_rfname, io.path
io.close
assert_equal $mrbtest_io_rfname, io.path
io.closed?
assert_true io.closed?
end
assert('File.basename') do