Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added another inheritance test

  • Loading branch information...
commit 070e479b364f43787c1526b38589d2b17320cdcc 1 parent 03d8d3f
TJ Holowaychuk visionmedia authored
5 test/fixtures/pet-page.jade
@@ -5,4 +5,7 @@ block head
5 5 title= name
6 6
7 7 block content
8   - include pet
  8 + if super
  9 + include super-pet
  10 + else
  11 + include pet
14 test/fixtures/super-pet.html
... ... @@ -0,0 +1,14 @@
  1 +<html>
  2 + <head>
  3 + <title>tobi</title>
  4 + <script src="/jquery.js"></script>
  5 + </head>
  6 + <body>
  7 + <div class="pet">
  8 + <h1>tobi
  9 + </h1>
  10 + <p>tobi is a super ferret
  11 + </p>
  12 + </div>
  13 + </body>
  14 +</html>
5 test/fixtures/super-pet.jade
... ... @@ -0,0 +1,5 @@
  1 +
  2 +extends pet
  3 +
  4 +block description
  5 + p #{name} is a super #{species}
3  test/jade.test.js
@@ -917,7 +917,8 @@ module.exports = {
917 917
918 918 'test inheritance': function(assert){
919 919 assert.render('users.jade', 'users.html', { users: ['tobi', 'loki', 'jane'] });
920   - assert.render('pet-page.jade', 'pet.html', { name: 'tobi', age: 1, species: 'ferret' });
  920 + assert.render('pet-page.jade', 'pet.html', { super: false, name: 'tobi', age: 1, species: 'ferret' });
  921 + assert.render('pet-page.jade', 'super-pet.html', { super: true, name: 'tobi', age: 1, species: 'ferret' });
921 922 },
922 923
923 924 'test include': function(assert){

0 comments on commit 070e479

Please sign in to comment.
Something went wrong with that request. Please try again.