From 51965399df6c46fabc8ffb8ddbfbb583019d7381 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 6 Mar 2024 10:09:00 +0900 Subject: [PATCH] Use include instead of equal assertion. irb will load multiple rc files now. If developer have their rcfile on home directory or etc, equal assertion will fail with custom prompt. --- spec/ruby/core/binding/irb_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/ruby/core/binding/irb_spec.rb b/spec/ruby/core/binding/irb_spec.rb index b3bc274f78..c91577f0b3 100644 --- a/spec/ruby/core/binding/irb_spec.rb +++ b/spec/ruby/core/binding/irb_spec.rb @@ -11,6 +11,8 @@ describe "Binding#irb" do pipe.readlines.map(&:chomp) end - out[-3..-1].should == ["a ** 2", "100", "exit"] + [out[-3..-1], ["a ** 2", "100", "exit"]].transpose.each do |actual, expected| + actual.should include(expected) + end end end