Skip to content
Myr

Added Request#render() callback function. Closes #258

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

authored by visionmedia · committed by visionmedia · parent f8e4333 · Browse files · 2 files+23 added−6 removed
This commit

State

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

Diff stats

2 files+23 added−6 removed

  • tests:+13 added−0 removed
  • other:+10 added−6 removed

2 files+23 added−6 removed

modified:lib/express/plugins/view.js+10 added-6 removed
modified:spec/spec.plugins.view.js+13 added
63 unmodified lines
64 before_each65 set('views', 'spec/fixtures')66 end67 68 describe 'given a callback'69 it 'should be passed the rendered content'70 get('/', function(){71 this.render('hello.haml.html', {}, function(err, content){72 if (err) this.error(err)73 else this.halt(203, content)74 })75 })76 get('/').body.should.include '<html><body>'77 get('/').status.should.eql 20378 end79 end80 81 describe 'given a valid view name'82 describe 'and layout of the same type exists'83 it 'should render the layout and view'84 get('/', function(){
109 unmodified lines