         done()
 
       it 'should create an connection using only the "url" property, considers other non-connection settings', (done) ->
-        settings = {
+        settings =
           url: 'http://rightUser:rightPassword@right_host:32768/rightDatabase'
           promise: true
-        }
-        expectedConnObj = {
+
+        expectedConnObj =
           url: 'http://rightUser:rightPassword@right_host:32768'
           databaseName: 'rightDatabase'
           promise: true
-        }
+
 
         connObj = arangodb.generateConnObject settings
         connObj.should.eql expectedConnObj
         done()
 
       it 'should create an connection using the connection settings when url is not set', (done) ->
-        # TODO: create the test settings from reading in .loopbackrc and modify it
-        settings = {
+
+        settings = require('rc')('loopback').test.arangodb
+
+        settings =
           host: 'right_host'
           port: 32768
           database: 'rightDatabase'
           username: 'rightUser'
           password: 'rightPassword'
           promise: true
-        }
-        expectedConnObj = {
+
+        expectedConnObj =
           url: 'http://rightUser:rightPassword@right_host:32768'
           databaseName: 'rightDatabase'
           promise: true
-        }
+
 
         connObj = arangodb.generateConnObject settings
         connObj.should.eql expectedConnObj

        active: true
        likes: ['nodejs', 'loopback']
        location: new GeoPoint {lat: lat, lng: lng}
      }

      dbData = ds.connector.toDatabase 'ComplexModel', toDB
      expected = {
        name:
          first: firstName
          last: lastName
        profession: 'Node Developer'
        money: money
        birthday: birthdate
        icon: new Buffer('a20').toString('base64')
        active: true
        likes: ['nodejs', 'loopback']
        location:
          lat: lat
          lng: lng
      }
      dbData.should.eql expected
      done()


    it "should convert ArangoDB Types to the respective Loopback Data Types", (done) ->
      firstName = chance.first()
      lastName = chance.last()
      birthdate = chance.birthday({american: false})
      money = chance.integer {min: 100, max: 1000}
      lat = chance.latitude()
      lng = chance.longitude()

      fromDB = {
        name:
          first: firstName
          last: lastName
        profession: 'Node Developer'
        money: money
        birthday: birthdate
        icon: new Buffer('a20').toString('base64')
        active: true
        likes: ['nodejs', 'loopback']
        location:
          lat: lat
          lng: lng
      }
      jsonData = ds.connector.fromDatabase 'ComplexModel', fromDB
      expected = {
        name:
          first: firstName
          last: lastName
        profession: 'Node Developer'
        money: money
        birthday: birthdate
        icon: new Buffer('a20')
        active: true
        likes: ['nodejs', 'loopback']
        location: new GeoPoint {lat: lat, lng: lng}
      }

      jsonData.should.eql expected
      done()

      done()

  describe 'conversion', () ->
#    it "should convert Loopback Data Types to the respective ArangoDB Data Types", (done) ->
#      firstName = chance.first()
#      lastName = chance.last()
#      birthdate = chance.birthday({american: false})
#      money = chance.integer {min: 100, max: 1000}
#      lat = chance.latitude()
#      lng = chance.longitude()
#
#      toDB =
#        name:
#          first: firstName
#          last: lastName
#        profession: 'Node Developer'
#        money: money
#        birthday: birthdate
#        icon: new Buffer('a20')
#        active: true
#        likes: ['nodejs', 'loopback']
#        location: new GeoPoint {lat: lat, lng: lng}
#
#
#      dbData = ds.connector.toDatabase 'ComplexModel', toDB
#      expected =
#        name:
#          first: firstName
#          last: lastName
#        profession: 'Node Developer'
#        money: money
#        birthday: birthdate
#        icon: new Buffer('a20').toString('base64')
#        active: true
#        likes: ['nodejs', 'loopback']
#        location:
#          lat: lat
#          lng: lng
#
#      dbData.should.eql expected
#      done()


    it "should convert ArangoDB Types to the respective Loopback Data Types", (done) ->
      firstName = chance.first()
      lastName = chance.last()
      birthdate = chance.birthday({american: false})
