Sha256: 8855d6ce37740a5d4e789af4c5783b1c65fc61a90d2bb0692ac7612f9110ce1e

Contents?: true

Size: 1.15 KB

Versions: 8

Compression:

Stored size: 1.15 KB

Contents

describe 'uki.build'
    it 'should create single view'
        var c = uki.build([{
            view: new uki.view.Base()
        }])[0];

        c.should.not.be_null
        c.should.be_type 'object'
    end
    
    it 'should create view from path'
        var c = uki.build([{
            view: 'uki.view.Base'
        }])[0];

        c.should.not.be_null
        c.should.be_type 'object'
    end
    
    it 'should create view from should path'
        var c = uki.build([{
            view: 'Base'
        }])[0];

        c.should.not.be_null
        c.should.be_type 'object'
    end
    
    it 'should create view from a function call'
        var c = uki.build([{
            view: function() { return new uki.view.Base(); }
        }])[0];

        c.should.not.be_null
        c.should.be_type 'object'
    end
    
    it 'should create view from an object'
        var c = uki.build([{
            view: new uki.view.Base()
        }])[0];

        c.should.be_an_instance_of uki.view.Base
    end
    
    it 'should not update precreated views'
        var c = uki.build([new uki.view.Base()])[0]
        c.should.be_an_instance_of uki.view.Base
    end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uki-1.1.4 frameworks/uki/spec/unit/builder.spec.js
uki-1.1.3 frameworks/uki/spec/unit/builder.spec.js
uki-1.1.2 frameworks/uki/spec/unit/builder.spec.js
uki-1.1.1 frameworks/uki/spec/unit/builder.spec.js
uki-1.1.0 frameworks/uki/spec/unit/builder.spec.js
uki-1.0.2 frameworks/uki/spec/unit/builder.spec.js
uki-1.0.1 frameworks/uki/spec/unit/builder.spec.js
uki-1.0.0 frameworks/uki/spec/unit/builder.spec.js