 
   describe 'with processing shorthand', ->
     it 'should create a port with a callback', ->
-      s = new socket.InternalSocket
-      ps =
-        outPorts: new ports.OutPorts
-          out: new outport
-        inPorts: new ports.InPorts
+      s = new noflo.internalSocket.InternalSocket
+      ps =
+        outPorts: new noflo.OutPorts
+          out: new noflo.OutPort
+        inPorts: new noflo.InPorts
       ps.inPorts.add 'in', (event, payload) ->
         return unless event is 'data'
         chai.expect(payload).to.equal 'some-data'
-      chai.assert ps.inPorts.in instanceof inport
+      chai.assert ps.inPorts.in instanceof noflo.InPort
       ps.inPorts.in.attach s
       s.send 'some-data'
 
     it 'should also accept metadata (i.e. options) when provided', (done) ->
-      s = new socket.InternalSocket
+      s = new noflo.internalSocket.InternalSocket
       expectedEvents = [
         'connect'
         'data'
         'disconnect'
       ]
       ps =
-        outPorts: new ports.OutPorts
-          out: new outport
-        inPorts: new ports.InPorts
+        outPorts: new noflo.OutPorts
+          out: new noflo.OutPort
+        inPorts: new noflo.InPorts
       ps.inPorts.add 'in',
         datatype: 'string'
         required: true


  describe 'with IP handle callback option', ->
    it 'should pass IP objects to handler', (done) ->
      s = new socket.InternalSocket
      ps =
        outPorts: new ports.OutPorts
          out: new outport
        inPorts: new ports.InPorts
      ps.inPorts.add 'in',
        datatype: 'string'
        required: true

        'buffered-data-3'
      ]

      p = new noflo.InPort
        buffered: true
      , (eventName) ->
          expectedEvent = expectedEvents.shift()
