aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 4b74bd6a4b..955ed09361 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -143,6 +143,16 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
+ def test_config_postgresql_database
+ run_generator([destination_root, "-d", "postgresql"])
+ assert_file "config/database.yml", /postgresql/
+ unless defined?(JRUBY_VERSION)
+ assert_file "Gemfile", /^gem\s+["']pg["']$/
+ else
+ assert_file "Gemfile", /^gem\s+["']activerecord-jdbcpostgresql-adapter["']$/
+ end
+ end
+
def test_config_jdbcmysql_database
run_generator([destination_root, "-d", "jdbcmysql"])
assert_file "config/database.yml", /mysql/