describe 'Express' before_each reset() end describe 'View' describe 'set("views")' it 'should default to /views' set('root', 'spec') set('views').should.eql 'spec/views' end end describe 'set("partials")' it 'should default to /partials' set('root', 'spec') set('partials').should.eql 'spec/views/partials' set('views', 'magicland') set('partials').should.eql 'magicland/partials' end end describe '#partial()' before_each set('views', 'spec/fixtures') set('partials', 'spec/fixtures/partials') end describe 'given a valid view name' it 'should render a partial' get('/', function(){ this.render('list.html.haml', { locals: { items: ['foo', 'bar'] }}) }) get('/').body.should.include '