 describe 'acorn.shells.AcornLinkShell', ->
   Shell = acorn.shells.Shell
   AcornLinkShell = acorn.shells.AcornLinkShell
+
+  Model = AcornLinkShell.Model
+  MediaView = AcornLinkShell.MediaView
+  RemixView = AcornLinkShell.RemixView
 
   options =
     shellid: 'acorn.AcornLinkShell'

    acorn.util.appendCss()
    $player = $('<div>').addClass('acorn-player').appendTo('body')

    model = new AcornLinkShell.Model options

    contentView = new AcornLinkShell.MediaView model: model
    contentView.$el.width 600
    contentView.render()
    $player.append contentView.el


    remixView = new AcornLinkShell.RemixView model: model
    remixView.$el.width 600
    remixView.render()
    $player.append remixView.el

  describe 'AcornLinkShell.Model', ->

    it 'should retrieve acornid from link correctly', ->
      model = new Model options
      expect(model.acornid()).toBe 'nyfskeqlyx'

    it 'should have an acornModel', ->
      model = new Model options
      expect(model.acornModel instanceof acorn.Model).toBe true

    it 'should load (and call `onceLoaded` callbacks)', ->
      spy = jasmine.createSpy()
      model = new Model options
      model.onceLoaded spy
      model.onceLoaded spy
      model.onceLoaded spy
