Skip to content
Myr

Added spec for layouts with different engines

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

authored by visionmedia · committed by visionmedia · parent 15beb81 · Browse files · 3 files+12 added−1 removed
This commit

State

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

Diff stats

3 files+12 added−1 removed

  • tests:+9 added−0 removed
  • other:+3 added−1 removed

3 files+12 added−1 removed

modified:lib/express/plugins/view.js+3 added-1 removed
added:spec/fixtures/layout.html.ejs+1 added
1<p><%= body %></p>
modified:spec/spec.plugins.view.js+8 added
147 unmodified lines
148 get('/').body.should.include '<h2>Hello'149 end150 end151 152 describe 'given a layout name with a different engine'153 get('/', function(){154 this.render('hello.html.haml', { layout: 'layout.html.ejs' })155 })156 get('/').body.should.include '<h2>Hello'157 get('/').body.should.include '<p>'158 end159 160 describe 'when layout: false'161 it 'should render the view only'162 get('/', function(){163 this.render('hello.html.haml', { layout: false })
63 unmodified lines