Environment spec

There's some git internal stuff that doesn't make sense to test with specs. Maybe we could refactor out all the git helper methods like in_branch not to keep them in the vendor or environment. But I don't think it makes sense to spend time on it at the moment.