UNPKG

606 Btext/coffeescriptView Raw
1cc = require '../lib/coffeecup'
2
3describe 'Inline', ->
4 describe '#cede(name, attr)', ->
5 it 'should render', ->
6 t = -> p "This text could use #{cede -> strong -> a href: '/', 'a link'}."
7 cc.render(t).should.equal '<p>This text could use <strong><a href="/">a link</a></strong>.</p>'
8
9describe 'Inline optimized', ->
10 describe '#cede(name, attr)', ->
11 it 'should render', ->
12 t = -> p "This text could use #{cede -> strong -> a href: '/', 'a link'}."
13 cc.render(t, optimized: true, cache: on).should.equal '<p>This text could use <strong><a href="/">a link</a></strong>.</p>'