Skip to content

Commit

Permalink
Use include instead of equal assertion.
Browse files Browse the repository at this point in the history
irb will load multiple rc files now. If developer have their rcfile on
home directory or etc, equal assertion will fail with custom prompt.
  • Loading branch information
hsbt committed Mar 6, 2024
1 parent 23dc7aa commit 5196539
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/ruby/core/binding/irb_spec.rb
Expand Up @@ -11,6 +11,8 @@
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

0 comments on commit 5196539

Please sign in to comment.