Sha256: 1a7a06c087937e6e419cfacbc50784f8dcfe4f2b540d732af82f80daab3d1064

Contents?: true

Size: 848 Bytes

Versions: 50

Compression:

Stored size: 848 Bytes

Contents

describe "Joosy.Templaters.RailsJST", ->

  beforeEach ->
    @templater = new Joosy.Templaters.RailsJST()

    class @Klass extends Joosy.Module

    Joosy.namespace 'British.Cities', ->
      class @Klass extends Joosy.Module

  it "should resolve templates correctly", ->
    expect(@templater.resolveTemplate(undefined, "/absolute", undefined)).
        toEqual "absolute"

    expect(@templater.resolveTemplate('widgets', 'fuga', {})).
        toEqual 'widgets/fuga'

    expect(@templater.resolveTemplate('widgets', 'fuga', new @Klass)).
        toEqual 'widgets/fuga'

    expect(@templater.resolveTemplate('widgets', 'fuga', new British.Cities.Klass)).
        toEqual 'widgets/british/cities/fuga'

    expect(@templater.resolveTemplate('widgets', 'hoge/fuga', new British.Cities.Klass)).
        toEqual 'widgets/british/cities/hoge/fuga'

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
joosy-1.2.0.alpha.38 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.1.2 spec/javascripts/joosy/core/templaters/rails_jst_spec.js.coffee
joosy-1.2.0.alpha.37 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.36 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.35 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.34 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.33 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.32 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.31 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.30 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.29 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.28 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.27 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.25 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.24 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.23 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.1.1 spec/javascripts/joosy/core/templaters/rails_jst_spec.js.coffee
joosy-1.2.0.alpha.22 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.21 spec/joosy/core/templaters/rails_jst_spec.coffee
joosy-1.2.0.alpha.20 spec/joosy/core/templaters/rails_jst_spec.coffee