Permalink
Browse files

Merge pull request #3357 from rahul100885/rahul100885_ws

Added test case for postgresql database
  • Loading branch information...
2 parents 139562f + d21405a commit 8aabdc69b7c498770e4c2864dad3e2790a40d10f @vijaydev vijaydev committed Oct 25, 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 8aabdc6

Please sign in to comment.