Beispiel #1
0
            it("is called to determine the default locale to use", function () {
                var delegate = {
                    localizerWillUseLocale: function () {
                        return "en-x-delegate";
                    }
                };

                spyOn(delegate, 'localizerWillUseLocale').and.callThrough();

                Localizer.defaultLocalizer.delegate = delegate;
                Localizer.defaultLocalizer.initWithLocale();

                expect(delegate.localizerWillUseLocale).toHaveBeenCalled();
                expect(Localizer.defaultLocalizer.locale).toBe("en-x-delegate");
            });
Beispiel #2
0
 beforeEach(function () {
     Localizer.defaultLocalizer.reset();
 });