Sha256: 585a25189b02fb0d269efbe787b7099f817173527217289c00ef522be3a6c155
Contents?: true
Size: 1.19 KB
Versions: 5
Compression:
Stored size: 1.19 KB
Contents
describe "Mercury.Regions.Simple", -> template 'mercury/regions/simple.html' beforeEach -> @regionElement = $('#simple_region1') describe "constructor", -> beforeEach -> @buildSpy = spyOn(Mercury.Regions.Simple.prototype, 'build').andCallFake(=>) @bindEventsSpy = spyOn(Mercury.Regions.Simple.prototype, 'bindEvents').andCallFake(=>) it "expects an element and window", -> @region = new Mercury.Regions.Simple(@regionElement, window) expect(@region.element.get(0)).toEqual($('#simple_region1').get(0)) expect(@region.window).toEqual(window) it "accepts options", -> @region = new Mercury.Regions.Simple(@regionElement, window, {foo: 'something'}) expect(@region.options).toEqual({foo: 'something'}) it "sets it's type", -> @region = new Mercury.Regions.Simple(@regionElement, window) expect(@region.type()).toEqual('simple') it "calls build", -> @region = new Mercury.Regions.Simple(@regionElement, window) expect(@buildSpy.callCount).toEqual(1) it "calls bindEvents", -> @region = new Mercury.Regions.Simple(@regionElement, window) expect(@bindEventsSpy.callCount).toEqual(1)
Version data entries
5 entries across 5 versions & 1 rubygems