diff --git a/test/yamatanooroti/test_run_ruby.rb b/test/yamatanooroti/test_run_ruby.rb index e4407f7..14f244a 100644 --- a/test/yamatanooroti/test_run_ruby.rb +++ b/test/yamatanooroti/test_run_ruby.rb @@ -2,12 +2,15 @@ require 'tmpdir' class Yamatanooroti::TestRunRuby < Yamatanooroti::TestCase + def teardown + close + end + def test_winsize start_terminal(5, 30, ['ruby', '-rio/console', '-e', 'puts(IO.console.winsize.inspect)']) assert_screen(<<~EOC) [5, 30] EOC - close end def test_wait_for_startup_message @@ -19,14 +22,12 @@ def test_wait_for_startup_message prompt>hello HELLO EOC - close end def test_move_cursor_and_render start_terminal(5, 30, ['ruby', '-rio/console', '-e', 'STDOUT.puts(?A);STDOUT.goto(2,2);STDOUT.puts(?B)']) assert_screen(['A', '', ' B', '', '']) assert_equal(['A', '', ' B', '', ''], result) - close end def test_meta_key @@ -38,7 +39,6 @@ def test_meta_key assert_screen(<<~EOC) >>>aaa bbb ccc EOC - close ensure get_out_from_tmpdir end @@ -50,7 +50,6 @@ def test_assert_screen_takes_a_message_when_failed bbb EOC end - close end private