Shell Out Directly To Git Instead of Using Git Gem
The Git gem was a great way to write these scripts very quickly, but now that I've wrapped the scripts in this gem and am trying to test everything in a minimally brittle way, the gem is getting in the way. This article demonstrates a very straightforward way to mock calls out to git
in unit tests that trump what would I have to do to test GitRepository
, which is basically just use receive_message_chain
. I'd rather test the use of git commands instead of the use of ruby methods on a wrapper for Git.
This probably wouldn't be too difficult to pull off because I've isolated use of the gem to GitRepository
, but it's not a huge priority.