I am trying to play around with $q, write some tests, try to stub promises etc. and I wondered if there is a way to return fully resolved promise like one can do it with whenjs, when("stuff to return), something that would be equal to this
  function fullyResolvedPromise(expectedResponse) {
        var dfd = $q.defer();
        dfd.resolve(expectedResponse);
        $rootScope.$apply();
        return dfd.promise;
    }
Clarification: I know this code works, but I want to do it without writing this function. I want to do something like this $q(expectedresponse) and get equivalent to above code. That is what I am after. Just like with whenjs you can write when(stuffToResolve) and it would return you a fully resolved promise.
 
    