+1 I think running the test with a test repo fixture would be good (albeit slow), Also using rugged would lend itself a bit more towards mocking this.