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
Родитель 23dc7aa2c5
Коммит 51965399df
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

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