searls/jasmine-maven-plugin — pull request #94 by clehmann (2012-08-01 18:20:32+00:00)
Title: Use absolute paths for all spec files in the RequireJsSpecRunnerHtmlGenerator

The RequireJsSpecRunnerHtmlGenerator includes all spec files using a relative path with the extension at the end. RequireJs assumes that any dependency with a .js should not be treated as a module and loads that as script directly. That means the 'baseUrl' is not applied to the paths and .js is not appended to the end when loading these scripts.

This all works great for javascript specs, but coffescript specs are treated as modules (since they don't end in .js, they end in .coffee) and the 'baseUrl' is applied. This patch just adds a slash to the beginning of all spec files to force them to be loaded at that path, not as a module.

See http://requirejs.org/docs/api.html#jsfiles for details on how requireJs loads files directly. We can provide a sample project exhibiting the issue if need be.