 
       gobgp.addPath family: 'ipv4-unicast', PREFIX
 
-      table = global_rib()
-      expect(table.length).to.equal 1
-      expect(table[0]['prefix']).to.equal PREFIX
+      prefixes = global_rib(PREFIX)
+      expect(prefixes.length).to.equal 1
 
     it 'originates a route with BGP community string', ->
       expect(global_rib()).to.be.empty
 
       gobgp.addPath family: 'ipv4-unicast', "#{PREFIX} community no-advertise"
 
-      table = global_rib()
-      expect(table.length).to.equal 1
-      expect(table[0]['prefix']).to.equal PREFIX
+      prefixes = global_rib(PREFIX)
+      expect(prefixes.length).to.equal 1
 
       expect(communities(PREFIX)).to.eql [4294967042]
 


      gobgp.addPath family: 'ipv4-flowspec', FLOWSPEC_PREFIX

      table = flowspec_rib()
      expect(table.length).to.equal 1
      expect(table[0].prefix).to.equal "[source:#{PREFIX}]"

    it 'shows the RIB', ->  # TODO: This does actually nothing. Use chai-as-promised
      exec "gobgp global rib -a ipv4-flowspec add #{FLOWSPEC_PREFIX}"


      gobgp.modPath family: 'ipv4-unicast', PREFIX

      prefixes = global_rib(PREFIX)
      expect(prefixes.length).to.equal 1

    it 'withdraws a route', ->
      exec "gobgp global rib add #{PREFIX}"
