diff --git a/test/controllers/actual_db_schema/migrations_controller_test.rb b/test/controllers/actual_db_schema/migrations_controller_test.rb index 609e6f2..65e2887 100644 --- a/test/controllers/actual_db_schema/migrations_controller_test.rb +++ b/test/controllers/actual_db_schema/migrations_controller_test.rb @@ -135,8 +135,8 @@ def down post :rollback, params: { id: "20130906111513", database: "tmp/primary.sqlite3" } assert_response :redirect get :index - assert_select ".flash", - text: "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration" + message = "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration" + assert_select ".flash", text: message end end end diff --git a/test/controllers/actual_db_schema/phantom_migrations_controller_test.rb b/test/controllers/actual_db_schema/phantom_migrations_controller_test.rb index 502c888..5fc3532 100644 --- a/test/controllers/actual_db_schema/phantom_migrations_controller_test.rb +++ b/test/controllers/actual_db_schema/phantom_migrations_controller_test.rb @@ -155,8 +155,8 @@ def down post :rollback, params: { id: "20130906111513", database: "tmp/primary.sqlite3" } assert_response :redirect get :index - assert_select ".flash", - text: "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration" + message = "An error has occurred, this and all later migrations canceled:\n\nActiveRecord::IrreversibleMigration" + assert_select ".flash", text: message end test "POST #rollback_all changes all phantom migrations status to down and hide migration with down status" do diff --git a/test/dummy_app/config/database.yml b/test/dummy_app/config/database.yml index e804c7c..b7c49e3 100644 --- a/test/dummy_app/config/database.yml +++ b/test/dummy_app/config/database.yml @@ -1,10 +1,5 @@ --- test: - primary: - adapter: sqlite3 - database: tmp/primary.sqlite3 - migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate" - secondary: - adapter: sqlite3 - database: tmp/secondary.sqlite3 - migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate_secondary" + adapter: sqlite3 + database: tmp/primary.sqlite3 + migrations_paths: "/home/vlad/projects/actual_db_schema/test/dummy_app/db/migrate"