From e9a6ec05b69e2463711e584eb336c56dc06fbe71 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Fri, 25 Jan 2019 20:12:24 +0900 Subject: [PATCH] Use assertion methods in `File` test --- mrbgems/mruby-io/test/file.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mrbgems/mruby-io/test/file.rb b/mrbgems/mruby-io/test/file.rb index 8d2be04c8..7b67ded26 100644 --- a/mrbgems/mruby-io/test/file.rb +++ b/mrbgems/mruby-io/test/file.rb @@ -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