aboutsummaryrefslogtreecommitdiff
path: root/node_modules/renderkid/test/Layout.coffee
blob: 84550260997749e4fb0764992900872f20488afa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Layout = require '../src/Layout'

describe "Layout", ->
  describe "constructor()", ->
    it "should create root block", ->
      l = new Layout
      expect(l._root).to.exist
      l._root._name.should.equal '__root'

  describe "get()", ->
    it "should not be allowed when any block is open", ->
      l = new Layout
      l.openBlock()
      (->
        l.get()
      ).should.throw Error