Control output of rake tasks using test doubles rather than checking the Rails environment.