Merge pull request #3357 from rahul100885/rahul100885_ws

Added test case for postgresql database
This commit is contained in:
Vijay Dev
2011-10-25 13:43:47 -07:00

View File

@@ -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/