mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #3357 from rahul100885/rahul100885_ws
Added test case for postgresql database
This commit is contained in:
commit
8aabdc69b7
1 changed files with 10 additions and 0 deletions
|
@ -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/
|
||||
|
|
Loading…
Reference in a new issue