Skip to content
Myr

Started view partial support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent d61c248 · Browse files · 4 files+46 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+46 added−5 removed

  • tests:+21 added−0 removed
  • other:+25 added−5 removed

4 files+46 added−5 removed

modified:lib/express/plugins/view.js+25 added-5 removed
added:spec/fixtures/partials/item.haml.html+1 added
added:spec/fixtures/list.haml.html+3 added
modified:spec/spec.plugins.view.js+17 added
10 unmodified lines
11 set('views').should.eql 'spec/views'12 end13 end14 15 describe '#partial()'16 before_each17 set('views', 'spec/fixtures')18 end19 20 describe 'given a valid view name'21 it 'should render a partial'22 get('/', function(){23 this.render('list.haml.html', { locals: { items: ['foo', 'bar'] }})24 })25 get('/').body.should.include '<ul>'26 get('/').body.should.include '<li>foo'27 get('/').body.should.include '<li>bar'28 end29 end30 end31 32 describe '#render()'33 before_each34 set('views', 'spec/fixtures')35 end
134 unmodified lines