From 1fd73b358ae30a153ba4ee910a388f92a85b97c1 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Tue, 6 Aug 2024 00:53:40 +0900 Subject: [PATCH] Accept colon-style hash in test assertion (#732) Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10 --- test/reline/test_reline.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index f2feab684d..515805467d 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -399,7 +399,7 @@ def test_read_eof_returns_input io.close_write io.read end - assert_include(out, '{:result=>"a"}') + assert_include(out, { result: 'a' }.inspect) end def test_read_eof_returns_nil_if_empty @@ -411,7 +411,7 @@ def test_read_eof_returns_nil_if_empty io.close_write io.read end - assert_include(out, '{:result=>nil}') + assert_include(out, { result: nil }.inspect) end def test_require_reline_should_not_trigger_winsize