Edit in JSFiddle

// Code under test
var MyApp = function () {
    var testAsync = function () {
        // Do something that takes a long time...
    };

    var callSomethingThatUsesAsync = function () {
        // Get a jQuery deferred
        var deferred = $.Deferred();

        // Make an async call and do something when it's completed based on success/failure
        this.testAsync()
        .done(function () {
            // Resolve the deferred
            deferred.resolve("The async call succeeded");
        })
        .fail(function () {
            // Reject the deferred
            deferred.reject("The async call failed");
        });

        return deferred.promise();
    };

    return {
        testAsync: testAsync,
        callSomethingThatUsesAsync: callSomethingThatUsesAsync
    };
};

// Test helpers
var JasmineHelpers = function () {

    var deferredSuccess = function (args) {
        var d = $.Deferred();
        d.resolve(args);
        return d.promise();
    };

    var deferredFailure = function (args) {
        var d = $.Deferred();
        d.reject(args);
        return d.promise();
    };

    return {
        deferredSuccess: deferredSuccess,
        deferredFailure: deferredFailure
    };
};

// Specs
describe("Testing spies", function () {
    var jasmineHelpers = new JasmineHelpers();

    it("Should spy on async calls and use helpers to mock success/failure", function () {
        // Arrange
        var myApp = new MyApp();
        spyOn(myApp, "testAsync").and.callFake(function () {
            return jasmineHelpers.deferredSuccess();
        });

        // Act
        myApp.callSomethingThatUsesAsync()
        .always(function (result) {
            // Assert
            expect(result).toEqual("The async call succeeded");
        });
    });

});