 ViewRegistry = require '../src/view-registry'
-{View} = require '../src/space-pen-extensions'
 
 describe "ViewRegistry", ->
   registry = null

        node = document.createElement('div')
        expect(registry.getView(node)).toBe node

    describe "when passed a SpacePen view", ->
      it "returns the root node of the view with a .spacePenView property pointing at the SpacePen view", ->
        class TestView extends View
          @content: -> @div "Hello"

        view = new TestView
        node = registry.getView(view)
        expect(node.textContent).toBe "Hello"
        expect(node.spacePenView).toBe view

    describe "when passed an object with an element property", ->
      it "returns the element property if it's an instance of HTMLElement", ->
        class TestComponent

          expect(view2.model).toBe subclassModel

      describe "when no view provider is registered for the object's constructor", ->
        it "throws an exception", ->
          expect(-> registry.getView(new Object)).toThrow()

  describe "::addViewProvider(providerSpec)", ->
    it "returns a disposable that can be used to remove the provider", ->
