/*
 * Copyright (c) 2013, Yahoo! Inc.  All rights reserved.
 * Copyrights licensed under the New BSD License.
 * See the accompanying LICENSE.txt file for terms.
 */


/*jslint nomen:true, node:true */
/*globals describe,it */
"use strict";


var expect = require('chai').expect,
    index = require('../../lib/index.js');
    
describe('locator-handlebars', function () {

    describe('index', function () {

        it('extend', function () {
            var a = {
                foo: 'bar',
                extensions: 'baz',
                nameParser: 'test'
            },
                extended = index.yui(a);
            expect(extended.describe.summary).to.equal('Compile handlebars templates to yui modules');
            expect(extended.describe.extensions).to.equal('baz');
            expect(extended.describe.nameParser).to.equal('test');
            expect(extended.describe.foo).to.equal('bar');
        });

        it('extend default instance', function () {
            var extended = index.yui();
            expect(extended.describe.summary).to.equal('Compile handlebars templates to yui modules');
        });

    });

});

@@ -320,13 +320,9 @@
 ');%0A
-    
 %0A
+
 desc
@@ -570,20 +570,16 @@
      %7D,%0A
-    
         
@@ -607,16 +607,16 @@
 yui(a);%0A
+
         
@@ -1007,16 +1007,16 @@
 .yui();%0A
-
         
@@ -1119,24 +1119,677 @@
        %7D);%0A%0A
+        it('YUI/handlebars applied to index.yui().handlebars by default', function () %7B%0A            var extended = index.yui(),%0A%0A                expected = '1.0.0-yui',%0A                actual = extended.describe.handlebars.VERSION;%0A%0A            expect(actual.slice(-4)).to.equal(expected.slice(-4));%0A        %7D);%0A%0A        it('custom handlebars is used in extended instance', function () %7B%0A            var fakeHb = %7BVERSION:'ohhai'%7D,%0A                extended = index.yui(%7Bhandlebars: fakeHb%7D),%0A%0A                expected = 'ohhai',%0A                actual = extended.describe.handlebars.VERSION;%0A%0A            expect(actual).to.equal(expected);%0A        %7D);%0A%0A
     %7D);%0A%0A%7D);

add test for default & custom hb getting applied; whsp