Also allow manual setup of QUnit's done callback.

Hi,

first of all thanks a lot for creating OpenPhantomScripts ... great stuff!!

To work around issue1, i have adapted phantom-qunit.js a little.
All should work as before, but additionally, you can now include the following script directly after qunit.js to work around the done-callback issue (will attach the done handler manually).

    <script>
            window.QUnit.config.done.push(function(obj) {
                console.log("Tests passed: " + obj.passed);
                console.log("Tests failed: " + obj.failed);
                console.log("Total tests:  " + obj.total);
                console.log("Runtime (ms): " + obj.runtime);
                window.phantomComplete = true;
                window.phantomResults = obj;
            });
            window.phantomAttached = true;
    </script>


I guess this approach can be extended to also work with jasmine.
We could then create external script files for that and one would just need to include them directly after the test library.

It doesn't matter if this callback is attached, if the tests are run outside phantom.js...