Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Add coverage to Subject.sync #1428
I haven't implemented all the tests just yet because I thought you might have opinions on how they're structured, or you might not be interested in this change (which is totally fine).
My thinking is this:
Once that's in place, we might be in a better position to do some larger refactoring of the class depending on how you feel.
The class is fairly generic, but seems to have logic in there that's specific to certain kinds of subjects (knowledge of whether the subject is merged, or if a subject is a commit and has comments), which mixes the layers of abstraction a bit. We could introduce a template method pattern where the shared/default behaviour lives in the base class