diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-03-06 10:09:00 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-03-06 10:38:25 +0900 |
commit | 51965399df6c46fabc8ffb8ddbfbb583019d7381 (patch) | |
tree | 65821dc295a36920180e018986edc3f5a3e6c1e8 | |
parent | 23dc7aa2c5a104e73563134a595124804379f049 (diff) |
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.
-rw-r--r-- | spec/ruby/core/binding/irb_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |