velesin/jasmine-jquery — Issue #46: Issue loading multiple fixtures when running multiple specs
Author: emeryamiller
Created: 2012-01-19 15:36:48+00:00
State: open

I've been trying to track down this issue for a while, but without success, I'm hoping someone has either seen something similar or has an idea on how to track it down better.

When I run my entire jasmine test suite I get a number of failing test cases, a few are real failing tests, but the others give the following error:
`Fixture could not be loaded: jasmine/fixtures/activity_header.html (status: error, message: undefined)`

Then when I run a subset of those same tests and the fixture error goes away giving me a green status bar. Running the full suite again brings back the error for tests that previously passed. I'm not editing the tests in any way.

The odd thing is that when I get the error above, the browser isn't sending the ajax request (nothing appears in the Network tab of the Safari or Chrome development panel), and the server console isn't reporting any requests for those fixtures (I'm running a Rails server with jasminerice). It's as if something internal to javascript is preventing them from loading and returning the error. While debugging I've examined the error object and it has a 404 status, but I can't see how that's possible as nothing was ever sent out according to the browser and the server. The url of the request is fine, and if I make the request in a different browser window, it works fine.

Also interesting is that the fixtures associated with the last test case to run do load correctly (and their requests appear in the Network console of the browser as expected). The fixtures for the previous test cases do not however, though they all generate this error. I suspect that's why when I run a subset of tests the fixtures work, because there is only one test running the fixture in that context.

Any ideas on what could be causing these errors?