       dblB2add = noflo.internalSocket.createSocket()
       addr2sum = noflo.internalSocket.createSocket()
       sum = noflo.internalSocket.createSocket()
-
-      genA.inPorts.count.attach cntA
-      genB.inPorts.count.attach cntB
-      genA.outPorts.seq.attach gen2dblA
-      genB.outPorts.seq.attach gen2dblB
-      dblA.inPorts.num.attach gen2dblA
-      dblB.inPorts.num.attach gen2dblB
-      dblA.outPorts.out.attach dblA2add
-      dblB.outPorts.out.attach dblB2add
-      addr.inPorts.num1.attach dblA2add
-      addr.inPorts.num2.attach dblB2add
-      addr.outPorts.sum.attach addr2sum
-      sumr.inPorts.seq.attach addr2sum
-      sumr.outPorts.sum.attach sum
+      before ->
+        # Wires
+        genA = newGenerator 'A'
+        genB = newGenerator 'B'
+        dblA = newDoubler 'A'
+        dblB = newDoubler 'B'
+        addr = newAdder()
+        sumr = newSeqsum()
+
+        genA.inPorts.count.attach cntA
+        genB.inPorts.count.attach cntB
+        genA.outPorts.seq.attach gen2dblA
+        genB.outPorts.seq.attach gen2dblB
+        dblA.inPorts.num.attach gen2dblA
+        dblB.inPorts.num.attach gen2dblB
+        dblA.outPorts.out.attach dblA2add
+        dblB.outPorts.out.attach dblB2add
+        addr.inPorts.num1.attach dblA2add
+        addr.inPorts.num2.attach dblB2add
+        addr.outPorts.sum.attach addr2sum
+        sumr.inPorts.seq.attach addr2sum
+        sumr.outPorts.sum.attach sum
 
       it 'should process sequences of packets separated by disconnects', (done) ->
         return @skip 'WirePattern doesn\'t see disconnects because of IP objects'

        seqsum.outPorts.add 'sum', datatype: 'int'
        return seqsum

      # Wires
      genA = newGenerator 'A'
      genB = newGenerator 'B'
      dblA = newDoubler 'A'
      dblB = newDoubler 'B'
      addr = newAdder()
      sumr = newSeqsum()
      cntA = noflo.internalSocket.createSocket()
      cntB = noflo.internalSocket.createSocket()
      gen2dblA = noflo.internalSocket.createSocket()



    describe 'without output ports', ->
      foo = null
      sig = null
      before ->
        c = new noflo.Component
        c.inPorts.add 'foo'
        foo = noflo.internalSocket.createSocket()
        sig = noflo.internalSocket.createSocket()
        c.inPorts.foo.attach foo
        noflo.helpers.WirePattern c,
          in: 'foo'
          out: []
          async: true
        , (foo, grp, out, callback) ->
          setTimeout ->
            sig.send foo
            callback()
          , 20

      it 'should be fine still', (done) ->
        sig.on 'data', (data) ->
