Sha256: 7ce8d0b5cf1dc8ab4a28cb16db14e3256eaedcf4440b838abd0a9af16a997e68

Contents?: true

Size: 1.34 KB

Versions: 7

Compression:

Stored size: 1.34 KB

Contents

describe("LSD.Module.Options", function() {
  describe("#initialize", function() {
    it ("should instantiate without arguments", function() {
      var instance = new LSD.Widget;
      expect(instance instanceof LSD.Widget).toBeTruthy()
    });

    it ('should instantiate with element as argument', function() {
      var element = new Element('div');
      var instance = new LSD.Widget(element);
      expect(instance.element == element).toBeTruthy();
    });

    it ('should instantiate with options as argument', function() {
      var options = {magic: 784};
      var instance = new LSD.Widget(options);
      expect(instance.options.magic == 784).toBeTruthy();
    });
    
    it ('should instantiate with options and element as arguments', function() {
      var options = {'honk': 'kong'};
      var element = new Element('div');
      var instance = new LSD.Widget(options, element);
      expect(instance.options.honk == 'kong').toBeTruthy();
      expect(instance.element == element).toBeTruthy();
    });
    
    it ('should instantiate with element and options as arguments', function() {
      var options = {'honk': 'kong'};
      var element = new Element('div');
      var instance = new LSD.Widget(element, options);
      expect(instance.options.honk == 'kong').toBeTruthy();
      expect(instance.element == element).toBeTruthy();
    });
  });
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lsd_rails-0.1.6 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1.5 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1.4 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1.3 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1.2 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1.1 Packages/lsd-specs/lsd/Module/Accessories/Options.js
lsd_rails-0.1 Packages/lsd-specs/lsd/Module/Accessories/Options.js