Skip to content
Myr

Merge branch 'pre-cache-views'

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

authored by visionmedia · committed by visionmedia · parents 7d100da, faaef54 · Browse files · 2 files+34 added−57 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+34 added−57 removed

  • tests:+0 added−20 removed
  • other:+34 added−37 removed

2 files+34 added−57 removed

modified:lib/express/plugins/view.js+34 added-37 removed
modified:spec/spec.plugins.view.js-20 removed
119 unmodified lines
120 get('/').body.should.include '<h2>Hello'121 end122 end123 124 describe 'when "cache view contents" is enabled'125 it 'should read the views into memory only once'126 enable('cache view contents')127 get('/', function(){128 this.render('hello.haml.html')129 })130 get('/cached', function(){131 var self = this132 this.cache.get('view:spec/fixtures/hello.haml.html', function(val){133 self.halt(200, val ? 'yes' : 'no')134 })135 })136 get('/cached').body.should.eql 'no'137 get('/')138 get('/cached').body.should.eql 'yes'139 get('/')140 get('/cached').body.should.eql 'yes'141 end142 end143 124 describe 'when engine cannot be found'125 it 'should throw an error'126 get('/', function(){127 this.render('user.invalid.html')
53 unmodified lines