Refactor to avoid errors from chefspec unit testing