diff --git a/spec/suites/core/OptionsSpec.js b/spec/suites/core/OptionsSpec.js deleted file mode 100644 index 925e5958..00000000 --- a/spec/suites/core/OptionsSpec.js +++ /dev/null @@ -1,37 +0,0 @@ -describe('Options', function() { - var Klass; - - beforeEach(function() { - Klass = L.Class.extend({ - options: { - foo1: 1, - foo2: 2 - }, - - includes: [L.Mixin.Options] - }); - }); - - describe('#setOptions', function() { - it('should set the given options, overwriting the default ones', function() { - var a = new Klass(); - - expect(a.options).toEqual({foo1: 1, foo2: 2}); - - a.setOptions({foo2: 3, foo3: 4}); - - expect(a.options).toEqual({foo1: 1, foo2: 3, foo3: 4}); - }); - - it('should fire optionschange event if Options module is availalbe', function() { - Klass.include(L.Mixin.Events); - var a = new Klass(), - spy = jasmine.createSpy('optionschange handler'); - - a.on('optionschange', spy); - a.setOptions({foo1: 3}); - - expect(spy).toHaveBeenCalled(); - }); - }); -}); \ No newline at end of file diff --git a/src/core/Options.js b/src/core/Options.js deleted file mode 100644 index d8edf820..00000000 --- a/src/core/Options.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - * L.Mixin.Options adds a small shortcut for options handling - */ - -L.Mixin.Options = { - setOptions: function(/*Object*/ options) { - this.options = L.Util.extend(this.options || {}, options); - - if (this.fireEvent) { - this.fireEvent('optionschange'); - } - } -}; \ No newline at end of file