pivotal/jasmine-gem — Issue #65: "Uncaught TypeError: Cannot call method 'complete' of undefined" When running Jasmine with no spec files
Author: joneath
Created: 2011-11-20 05:24:17+00:00
State: open

When starting with a fresh rails 3.1 project running jasmine-core (1.2.0.rc1) from master with no jasmine spec files, causes a JavaScript exception in the jasmine.HtmlReporter object at line 87 of jasmine-html.js. This caused me to debug my project configuration, until I added a single spec file with a pending spec.

Here are the contents of the file:

describe("pending", function(){
it("should be pending", function(){

});
});

Jasmine expects at least one "it" function or it blows up. The exception should either be nicer, or preferably it should degrade nicely to a 0 of 0 specs run report. I may patch this, but for now a single spec file with a spec is the workaround.