Sha256: 1b1aa73c74dd2d83f1052bf4a238b4ffaf37f2bbd6c3fe36d3b9318276ebf26d

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

#= require "./helper"

describe "The Luca Framework", ->
  it "should specify a version", ->
    expect(Luca.VERSION).toBeDefined()

  it "should define Luca in the global space", ->
    expect(Luca).toBeDefined()

  it "should enable bootstrap by default", ->
    expect(Luca.enableBootstrap).toBeTruthy()

  it "should have classes in the registry", ->
    expect( Luca.registry.classes ).toBeDefined()

  it "should be able to lookup classes in the registry by ctype", ->
    expect( Luca.registry.lookup("form_view") ).toBeTruthy()

  it "should allow me to add view namespaces to the registry", ->
    Luca.registry.addNamespace("Test.namespace")
    expect( Luca.registry.namespaces ).toContain("Test.namespace")

  it "should resolve a value.string to the object", ->
    window.nested =
      value:
        string: "haha"

    value = Luca.util.nestedValue("nested.value.string", window)

    expect(value).toEqual("haha")

  it "should create an instance of a class by ctype", ->
    object = 
      ctype: "template"
      template: "components/form_view"    

    component = Luca.util.lazyComponent(object)
    expect( _.isFunction(component.render) ).toBeTruthy()

  it "should find a created view in the cache", ->
    template = new Luca.components.Template
      template: "components/form_view"    
      name: 'test_template'

    expect(Luca.cache("test_template")).toBeDefined()


describe 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
luca-0.7.0 spec/framework_spec.coffee
luca-0.6.9 spec/framework_spec.coffee
luca-0.6.8 spec/framework_spec.coffee
luca-0.6.7 spec/framework_spec.coffee
luca-0.6.6 spec/framework_spec.coffee