Open robertdfrench opened 2 years ago
I agree. This is the nature of mocks like this though. So I'm not sure a way to "fix" it though. If the functions we use have an external dependency and we need to control it, we will have to keep adding functionality. Although I do agree that we are just turning around and doing similar integration tests so it doesn't make a lot of sense.
Potential solution: create an in-memory mock git instead of external exes.
We can deal with this once #49 is finished.
At the moment, the tests that depend on
fake_git
are more-or-less ask the question "have we invokedgit
with the right arguments?". I am not sure what we get from this.I think it made sense initially to have
fake_git
andfailing_git
so that we could test our strategy for executing subprocesses. I am less sure that it makes sense to keep extendingfake_git
with new subcommands, only to turn around and write a similar integration test against real git.