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.
This commit is contained in:
Hiroshi SHIBATA 2024-03-06 10:09:00 +09:00
parent 23dc7aa2c5
commit 51965399df

View File

@ -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