Edit in JSFiddle

// Code under test
function testAsyncWithDeferredReturnValue() {
    // Get a jQuery deferred
    var deferred = $.Deferred();

    // Wait two seconds, then set the return true
    setTimeout(function () {
        // Resolve the deferred
        deferred.resolve(true);
    }, 2000);

    // Return the deferred promise
    return deferred.promise();
}

// Specs
describe("Testing async calls with beforeEach and invoking the special done callback in the promise's done callback and using the promise's return data", function () {
    var flag = false;

    beforeEach(function (done) {
        testAsyncWithDeferredReturnValue()
        .done(function (result) {
            flag = result;
            
            // Invoke the special done callback
            done();
        });
    });
    
    it("Should be true if the async call has completed", function () {
        expect(flag).toEqual(true);
    });

});