diff --git a/test/fixtures/underscore/partials.underscore b/test/fixtures/underscore/partials.underscore index 472c5ae..d2b3980 100644 --- a/test/fixtures/underscore/partials.underscore +++ b/test/fixtures/underscore/partials.underscore @@ -1 +1 @@ -

<%- user.name %>

<%= partials.partial(user) %> \ No newline at end of file +<%= partials.partial({user: user}) %> \ No newline at end of file diff --git a/test/fixtures/underscore/user_partial.underscore b/test/fixtures/underscore/user_partial.underscore deleted file mode 100644 index 5e42261..0000000 --- a/test/fixtures/underscore/user_partial.underscore +++ /dev/null @@ -1 +0,0 @@ -

<%- name %> from user_partial!

\ No newline at end of file diff --git a/test/shared/partials.js b/test/shared/partials.js index f848766..765222f 100644 --- a/test/shared/partials.js +++ b/test/shared/partials.js @@ -14,7 +14,20 @@ exports.test = function(name) { fs.readFileSync = readFileSync; }); - if (name === 'hogan' || name === 'mustache' || name === 'handlebars' || name === 'ractive') { + if (name === 'dust' || name === 'arc-templates') { + it('should support rendering a partial', function(done) { + var str = fs.readFileSync('test/fixtures/' + name + '/user_partial.' + name).toString(); + var locals = { + user: user, + views: './test/fixtures/' + name + }; + cons[name].render(str, locals, function(err, html) { + if (err) return done(err); + html.should.equal('

Tobi from partial!

Tobi

'); + done(); + }); + }); + } else { it('should support partials', function(done) { var path = 'test/fixtures/' + name + '/partials.' + name; var locals = { user: user, partials: { partial: 'user' } }; @@ -42,34 +55,6 @@ exports.test = function(name) { done(); }); }); - } else if (name === 'underscore') { - it('should support partials', function(done) { - var path = 'test/fixtures/' + name + '/partials.' + name; - var locals = { - user: user, - partials: { - partial: 'user_partial' - } - }; - cons[name](path, locals, function(err, html) { - if (err) return done(err); - html.should.equal('

Tobi

Tobi from user_partial!

'); - done(); - }); - }); - } else { - it('should support rendering a partial', function(done) { - var str = fs.readFileSync('test/fixtures/' + name + '/user_partial.' + name).toString(); - var locals = { - user: user, - views: './test/fixtures/' + name - }; - cons[name].render(str, locals, function(err, html) { - if (err) return done(err); - html.should.equal('

Tobi from partial!

Tobi

'); - done(); - }); - }); } }); };