Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added another inheritance test

  • Loading branch information...
commit 070e479b364f43787c1526b38589d2b17320cdcc 1 parent 03d8d3f
@tj tj authored
View
5 test/fixtures/pet-page.jade
@@ -5,4 +5,7 @@ block head
title= name
block content
- include pet
+ if super
+ include super-pet
+ else
+ include pet
View
14 test/fixtures/super-pet.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <title>tobi</title>
+ <script src="/jquery.js"></script>
+ </head>
+ <body>
+ <div class="pet">
+ <h1>tobi
+ </h1>
+ <p>tobi is a super ferret
+ </p>
+ </div>
+ </body>
+</html>
View
5 test/fixtures/super-pet.jade
@@ -0,0 +1,5 @@
+
+extends pet
+
+block description
+ p #{name} is a super #{species}
View
3  test/jade.test.js
@@ -917,7 +917,8 @@ module.exports = {
'test inheritance': function(assert){
assert.render('users.jade', 'users.html', { users: ['tobi', 'loki', 'jane'] });
- assert.render('pet-page.jade', 'pet.html', { name: 'tobi', age: 1, species: 'ferret' });
+ assert.render('pet-page.jade', 'pet.html', { super: false, name: 'tobi', age: 1, species: 'ferret' });
+ assert.render('pet-page.jade', 'super-pet.html', { super: true, name: 'tobi', age: 1, species: 'ferret' });
},
'test include': function(assert){
Please sign in to comment.
Something went wrong with that request. Please try again.