Sha256: 238a48cd806587133d68761fd6f893ced2545cc38000e0d29279e614393c1fdd

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

describe("corkboard.js", function() {
  describe("$.corkboard.version", function() {
    it("is defined", function() {
      expect($.corkboard.version).toEqual('0.1.0');
    });
  });

  describe("$.corkboard.config", function() {
    var config = $.corkboard.config;

    it("specifies a key for the Pusher service", function() {
      expect(config.pusher).toBeDefined();
    });

    it("specifies the display 'weights' for tiles", function() {
      expect(config.weights).toEqual({
        s : 10,
        m : 3,
        l : 1
      });
    });
  });

  describe("$.fn.corkboard", function() {
    before(function() {
      spyOn($.corkboard, 'Board');
    });

    it("is defined", function() {
      expect($.fn.corkboard).toBeDefined();
    });

    it("creates a new Board", function() {
      var object = $('<div>');
      var result = object.corkboard();
      expect($.corkboard.Board).toHaveBeenCalled();
    });

    it("returns the given jQuery object", function() {
      var object = $('<div>');
      var result = object.corkboard();
      expect(result).toEqual(object);
    });
  });
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
corkboard-0.1.3 spec/javascripts/specs/corkboard_spec.js
corkboard-0.1.2 spec/javascripts/specs/corkboard_spec.js
corkboard-0.1.1 spec/javascripts/specs/corkboard_spec.js