1 | (function() {
|
2 | var Assemble, Handlebars;
|
3 |
|
4 | require('should');
|
5 |
|
6 | Handlebars = require('handlebars');
|
7 |
|
8 | Assemble = require('../lib/helpers-lib');
|
9 |
|
10 | describe('default', function() {
|
11 | return describe('{{default title "Not title available."}}', function() {
|
12 | return it('should provide a default or fallback value if a value doesn\'t exist.', function() {
|
13 | var context, source, template;
|
14 |
|
15 | source = '{{default title "No title available."}}';
|
16 | template = Handlebars.compile(source);
|
17 | context = {
|
18 | title: null
|
19 | };
|
20 | return template(context).should.equal('No title available.');
|
21 | });
|
22 | });
|
23 | });
|
24 |
|
25 | |
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | }).call(this);
|