Problem is that jasmine-jquery in not loading my fixtures from spec/fixtures folder. Now when I look at jasmine-jquery source code default path for fixtures is spec/javascripts/fixtures. In a version that I have, there is no spec/javascripts/fixtures folder. It seems it is something for Ruby gem. I also tried to create that javascripts folder but still it can't load it. When I place my fixture fragment inside of SpecRunner.html body - it works.
Here is my html fragment:
<ul class="fr">
<li></li>
</ul>
Spec file:
describe("something to describe", function() {
it("should see a DOM element", function() {
loadFixtures("custom.html");
expect($(".fr")).toExist();
});
});
Is that a bug or something with the path ?
Solved: It is a problem with google-chrome. By default it doesn't allow access to other domain by same origin policy. Solution is to run app from local server, or to use firefox.