refactor TaskDispatcher spec a bit