不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit 612f2c5d by sdepold

minor refactoring

1 parent 3ae83a8e
Showing with 3 additions and 11 deletions
...@@ -6,7 +6,6 @@ var config = require("./config/config") ...@@ -6,7 +6,6 @@ var config = require("./config/config")
, _ = Sequelize.Utils._ , _ = Sequelize.Utils._
describe('Migrator', function() { describe('Migrator', function() {
describe('getUndoneMigrations', function() {
var migrator = null var migrator = null
, SequelizeMeta = null , SequelizeMeta = null
...@@ -25,9 +24,9 @@ describe('Migrator', function() { ...@@ -25,9 +24,9 @@ describe('Migrator', function() {
} }
beforeEach(function() { migrator = null }) beforeEach(function() { migrator = null })
afterEach(function() { migrator = null })
// specs describe('getUndoneMigrations', function() {
it("returns no files if timestamps are after the files timestamp", function() { it("returns no files if timestamps are after the files timestamp", function() {
setup({ from: 20120101010101 }) setup({ from: 20120101010101 })
...@@ -72,7 +71,6 @@ describe('Migrator', function() { ...@@ -72,7 +71,6 @@ describe('Migrator', function() {
Helpers.async(function(done) { Helpers.async(function(done) {
migrator.getUndoneMigrations(function(err, migrations) { migrator.getUndoneMigrations(function(err, migrations) {
console.log(err)
expect(err).toBeFalsy() expect(err).toBeFalsy()
expect(migrations.length).toEqual(2) expect(migrations.length).toEqual(2)
done() done()
...@@ -97,14 +95,8 @@ describe('Migrator', function() { ...@@ -97,14 +95,8 @@ describe('Migrator', function() {
}) })
describe('migrate', function() { describe('migrate', function() {
var migrator = null
beforeEach(function() { beforeEach(function() {
migrator = new Migrator(sequelize, { setup({ from: 20111117063700, to: 20111117063700 })
path: __dirname + '/assets/migrations',
from: 20111117063700,
to: 20111117063700
})
Helpers.async(function(done) { Helpers.async(function(done) {
migrator.migrate().success(done).error(function(err) { console.log(err) }) migrator.migrate().success(done).error(function(err) { console.log(err) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!