Permalink
Browse files

Added test case for postgresql database

  • Loading branch information...
1 parent 5e1b912 commit d21405a07ce9264ed92b9c7385141e05ccea565c @rahul100885 rahul100885 committed Oct 16, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 railties/test/generators/app_generator_test.rb
@@ -143,6 +143,16 @@ def test_config_another_database
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/

0 comments on commit d21405a

Please sign in to comment.