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