Sha256: 6a047cde5c7dd1330141c0788a120cff8770404eb1a6e5446fbdf67125cd6d44

Contents?: true

Size: 447 Bytes

Versions: 7

Compression:

Stored size: 447 Bytes

Contents

describe "InlinePreloader", ->

  it "should load JS", ->
    window.variable_assigned_on_load = undefined
    callback = sinon.spy()
    
    runs ->
      InlinePreloader.load [['/spec/javascripts/support/assets/test.js']], 
        complete: callback
    
    waits 100
    
    runs ->
      expect(callback.callCount).toEqual 1
      expect(window.variable_assigned_on_load).toEqual 'yapyap'
      window.variable_assigned_on_load = undefined

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
joosy-1.0.0.RC4 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-1.0.0.RC3 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-1.0.0.RC2 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-1.0.0.RC1 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-0.1.0.RC3 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-0.1.0.RC2 spec/javascripts/joosy/preloaders/inline_spec.js.coffee
joosy-0.1.0.RC1 spec/javascripts/joosy/preloaders/inline_spec.js.coffee