dwf: moved runner finished & callback test to suites

This commit is contained in:
Davis W. Frank 2009-06-15 08:14:55 -07:00
parent 9928674b37
commit 95b52b9f82
2 changed files with 19 additions and 1 deletions

1
spec/bootstrap.js vendored
View File

@ -284,7 +284,6 @@ var runTests = function () {
runSuite('JsonReporterTest.js');
runSuite('SpyTest.js');
testRunnerFinishCallback();
testFormatsExceptionMessages();
testHandlesExceptions();
testResultsAliasing();

View File

@ -95,4 +95,23 @@ describe('RunnerTest', function() {
expect(results.failedCount).toEqual(1);
});
it('should set the finished flag when #finished is called', function(){
env.currentRunner.finish();
expect(env.currentRunner.finished).toEqual(true);
});
it('should call the finish callback when the runner is finished', function() {
var foo = 0;
env.currentRunner.finishCallback = function() {
foo++;
};
env.currentRunner.finish();
expect(env.currentRunner.finished).toEqual(true);
expect(foo).toEqual(1);
});
});