it('raises error if load fails', function () {
spyOn(window, 'la');
// la(condition, arg1, arg2) will be recorded by the spy
// but the actual window.la will NOT be called.
// http://jasmine.github.io/1.3/introduction.html#section-Spies
// actual window.la will be restored automatically after this spec finishes
loadFoo('invalid argument');
$httpBackend.flush();
// use different alias to window.la to avoid the spy
lazyAss(window.la.mostRecentCall.args[1] === 'failed to load invalid argument');
});
Convenient to test on la