aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul P. Chaudhari <rahul100885@gmail.com>2011-10-17 00:30:07 +0530
committerRahul Chaudhari <rahul100885@gmail.com>2011-10-18 11:37:33 +0530
commitd21405a07ce9264ed92b9c7385141e05ccea565c (patch)
tree536e551eaa6a2e248fd3f7504abf414c4e53352a
parent5e1b912f3b3a81cec99a3743b3a9d21e5c96d97c (diff)
downloadrails-d21405a07ce9264ed92b9c7385141e05ccea565c.tar.gz
rails-d21405a07ce9264ed92b9c7385141e05ccea565c.tar.bz2
rails-d21405a07ce9264ed92b9c7385141e05ccea565c.zip
Added test case for postgresql database
-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 133efb872f..2dcce4e884 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/