Layout.coffee 394 B

12345678910111213141516
  1. Layout = require '../src/Layout'
  2. describe "Layout", ->
  3. describe "constructor()", ->
  4. it "should create root block", ->
  5. l = new Layout
  6. expect(l._root).to.exist
  7. l._root._name.should.equal '__root'
  8. describe "get()", ->
  9. it "should not be allowed when any block is open", ->
  10. l = new Layout
  11. l.openBlock()
  12. (->
  13. l.get()
  14. ).should.throw Error