Skip to content

Commit

Permalink
Woop
Browse files Browse the repository at this point in the history
  • Loading branch information
pikesley committed Jan 18, 2016
1 parent 279e49a commit 8a1b169
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions spec/javascripts/list_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,33 @@ describe('Resusable lists', function() {
break
}
})

describe('with a recursive template', function() {
var json = {
'templates': [
'@things and @stuff'
],
'things': [
'Lions',
'Tigers',
'Bears'
],
'stuff': [
'@things and @things'
]
}

it('reuses the list when things get recursive', function() {
templated = template(json)
words = templated.split(' ').sort()
expect(words).toEqual([
'Bears',
'Lions',
'Tigers',
'and',
'and'
])
})
})
})
})

0 comments on commit 8a1b169

Please sign in to comment.