Read about our upcoming Code of Conduct on this issue

Commit 38cd3d64 authored by Robert Speicher's avatar Robert Speicher
Browse files

Add Commit#==

Prior, comparison would use the Ruby object's ID, which got out of sync
after a Spring fork and would result in erroneous test failures.

Now we just check that the compared object is a Commit and then compare
their underlying raw commit objects.
parent 48bc31887b18
......@@ -56,6 +56,10 @@ def id
@raw.id
end
def ==(other)
(self.class === other) && (raw == other.raw)
end
def diff_line_count
@diff_line_count ||= Commit::diff_line_count(self.diffs)
@diff_line_count
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment