diff --git a/test/irb/test_helper_method.rb b/test/irb/test_helper_method.rb index 291278c16..a3e2c43b2 100644 --- a/test/irb/test_helper_method.rb +++ b/test/irb/test_helper_method.rb @@ -76,7 +76,8 @@ def execute( type "exit" end - assert_include(output, '["required", "optional", ["splat"], "required", "optional", {:a=>1, :b=>2}, "block"]') + optional = {a: 1, b: 2} + assert_include(output, %[["required", "optional", ["splat"], "required", "optional", #{optional.inspect}, "block"]]) end def test_helper_method_injection_can_happen_after_irb_require diff --git a/test/irb/test_irb.rb b/test/irb/test_irb.rb index 2913f3d48..617e9c961 100644 --- a/test/irb/test_irb.rb +++ b/test/irb/test_irb.rb @@ -155,8 +155,8 @@ def test_current_context_restore type 'exit' end - assert_include output, '{:context_changed=>true}' - assert_include output, '{:context_restored=>true}' + assert_include output, {context_changed: true}.inspect + assert_include output, {context_restored: true}.inspect end end