Permalink
Browse files

Use sockets properly in tests

  • Loading branch information...
djdeath committed May 14, 2014
1 parent 9876302 commit e2dd335192ed414d0c16dee0a4697e74a26371e1
Showing with 14 additions and 14 deletions.
  1. +4 −4 spec/CollectGroups.coffee
  2. +6 −6 spec/CollectTree.coffee
  3. +4 −4 spec/ReadGroup.coffee
@@ -13,10 +13,10 @@ describe 'CollectGroups component', ->
beforeEach ->
c = CollectGroups.getComponent()
- c.inPorts.in.attach noflo.internalSocket.createSocket()
- c.outPorts.out.attach noflo.internalSocket.createSocket()
- ins = c.inPorts.in
- out = c.outPorts.out
+ ins = noflo.internalSocket.createSocket()
+ out = noflo.internalSocket.createSocket()
+ c.inPorts.in.attach ins
+ c.outPorts.out.attach out
describe 'when instantiated', ->
it 'should have input ports', ->
View
@@ -14,12 +14,12 @@ describe 'CollectTree component', ->
beforeEach ->
c = CollectTree.getComponent()
- c.inPorts.in.attach noflo.internalSocket.createSocket()
- c.outPorts.out.attach noflo.internalSocket.createSocket()
- c.outPorts.error.attach noflo.internalSocket.createSocket()
- ins = c.inPorts.in
- out = c.outPorts.out
- err = c.outPorts.error
+ ins = noflo.internalSocket.createSocket()
+ out = noflo.internalSocket.createSocket()
+ err = noflo.internalSocket.createSocket()
+ c.inPorts.in.attach ins
+ c.outPorts.out.attach out
+ c.outPorts.error.attach err
describe 'without any groups provided', ->
it 'should send an error and no data', (done) ->
View
@@ -13,10 +13,10 @@ describe 'ReadGroup component', ->
beforeEach ->
c = ReadGroup.getComponent()
- c.inPorts.in.attach noflo.internalSocket.createSocket()
- c.outPorts.group.attach noflo.internalSocket.createSocket()
- ins = c.inPorts.in
- group = c.outPorts.group
+ ins = noflo.internalSocket.createSocket()
+ group = noflo.internalSocket.createSocket()
+ c.inPorts.in.attach ins
+ c.outPorts.group.attach group
describe 'when instantiated', ->
it 'should have input ports', ->

0 comments on commit e2dd335

Please sign in to comment.