velesin / jasmine-jquery

jQuery matchers and fixture loader for Jasmine framework
MIT License
1.89k stars 347 forks source link

General usage questions #273

Open parky128 opened 8 years ago

parky128 commented 8 years ago

I have just started using this library in my project and so far have some mock data being returned as per below in one of my specs:

beforeEach(function() {
    jasmine.getJSONFixtures().fixturesPath='base/mocks';
    var mockData = jasmine.getJSONFixtures().load('someData.json');
    someData= mockData['someData.json'];
  });

I was wondering, can the fixturesPath be set globally for all specs so I don't have to add this in for each spec file?

Also, if I call load() on the fixtures singleton like in the example above, does that mean that json object is available in other tests located in different spec files?