aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/migration_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/migration_generator_test.rb')
-rw-r--r--railties/test/generators/migration_generator_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/railties/test/generators/migration_generator_test.rb b/railties/test/generators/migration_generator_test.rb
index 5c57d607fc..5812cbdfc9 100644
--- a/railties/test/generators/migration_generator_test.rb
+++ b/railties/test/generators/migration_generator_test.rb
@@ -254,11 +254,13 @@ class MigrationGeneratorTest < Rails::Generators::TestCase
end
end
- def test_migrations_paths_puts_migrations_in_that_folder
- run_generator ["create_books", "--migrations_paths=db/test_migrate"]
- assert_migration "db/test_migrate/create_books.rb" do |content|
- assert_method :change, content do |change|
- assert_match(/create_table :books/, change)
+ def test_database_puts_migrations_in_configured_folder
+ with_secondary_database_configuration do
+ run_generator ["create_books", "--database=secondary"]
+ assert_migration "db/secondary_migrate/create_books.rb" do |content|
+ assert_method :change, content do |change|
+ assert_match(/create_table :books/, change)
+ end
end
end
end