   )
 
 copyFixturesToMigrationsPath = (scope)->
-  mkdirp.sync(definitionsPath) #This should create the db/migrations + db/migrations/definitions dirs in the example_app
+  mkdirp.sync(migrationsPath) #This should create the db/migrations + db/migrations/definitions dirs in the example_app
   fixturePath = path.resolve('test/specs/fixtures/migrations')
   migrationFixtures = glob.sync("#{fixturePath}/*#{scope}*.js", {})
-  definitionFixtures = glob.sync("#{fixturePath}/definitions/*#{scope}*.js", {})
   copy(migrationFixtures, migrationsPath)
-  copy(definitionFixtures, definitionsPath)
 
 describe 'db:migrate', ->
   beforeEach (done)->


  it 'should be able to run a migration', (done)->
    tableName = 'one_migration'
    migrationDefinitionPath = path.resolve("test/specs/fixtures/migrations/definitions/one_migration.js")
    migrationDefinition = require(migrationDefinitionPath)
    copyFixturesToMigrationsPath(tableName)
    Migrator.migrate(@adapter, migrationsPath, null, (err)=>
      return done(err) if err
      @ourAdapter.describe(tableName, (err, definition)->
        return done(err) if err
        assert.equal(_.keys(definition).length, _.keys(migrationDefinition).length)
        done()
      )
    )

  it 'should be able to run 2 migrations', (done)->
    tableName = 'two_migrations'
    migrationDefinitionPath = path.resolve("test/specs/fixtures/migrations/definitions/two_migrations.js")
    migrationDefinition = require(migrationDefinitionPath)
    copyFixturesToMigrationsPath(tableName)
    Migrator.migrate(@adapter, migrationsPath, null, (err)=>
      return done(err) if err
      @ourAdapter.describe(tableName, (err, definition)->
        return done(err) if err
        assert.equal(_.keys(definition).length, _.keys(migrationDefinition).length+1)
        done()
      )
    )

SailsIntegration = rek("lib/sails-migrations/sails_integration.coffee")
ourAdapter = rek("lib/sails-migrations/adapter.coffee")
migrationsPath = path.resolve('test/example_app/db/migrations')

cleanupMigrationFiles = (migrationsPath)->
  rmdirp.sync(migrationsPath)
