Skip to content
Myr

Merge branch 'integration'

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

authored by visionmedia · committed by visionmedia · parents 15beb81, 42b28d5 · Browse files · 5 files+23 added−7 removed
This commit

State

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

Diff stats

5 files+23 added−7 removed

  • tests:+14 added−3 removed
  • other:+9 added−4 removed

5 files+23 added−7 removed

modified:lib/express/plugins/view.js+9 added-4 removed
added:spec/fixtures/layout-user.html.haml+2 added
1%title= "Viewing " + name2%body!= body
added:spec/fixtures/layout.html.ejs+1 added
1<p><%= body %></p>
deleted:spec/fixtures/layout.user.html.haml-2 removed
1%title= "Viewing " + name2%body!= body
modified:spec/spec.plugins.view.js+11 added-1 removed
147 unmodified lines
148 get('/').body.should.include '<h2>Hello'149 end150 end151 152 describe 'given a full layout name'153 it 'should render a layout of a different engine'154 get('/', function(){155 this.render('hello.html.haml', { layout: 'layout.html.ejs' })156 })157 get('/').body.should.include '<h2>Hello'158 get('/').body.should.include '<p>'159 end160 end161 162 describe 'when layout: false'163 it 'should render the view only'164 get('/', function(){165 this.render('hello.html.haml', { layout: false })
28 unmodified lines
194 195 it 'should have direct access to locals within the layout'196 get('/user', function(){197 this.render('user.html.haml', {188 layout: 'layout.user',198 layout: 'layout-user',199 locals: {200 name: 'tj',201 email: 'tj@vision-media.ca'202 }
26 unmodified lines