提交 53444b86 编写于 作者: J José Valim

Merge pull request #1813 from arunagw/jruby_tests

Tests Added for jdbc option added for Jruby
......@@ -134,7 +134,7 @@ def test_config_another_database
def test_config_jdbcmysql_database
run_generator([destination_root, "-d", "jdbcmysql"])
assert_file "config/database.yml", /jdbcmysql/
assert_file "config/database.yml", /mysql/
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcmysql-adapter["']$/
# TODO: When the JRuby guys merge jruby-openssl in
# jruby this will be removed
......@@ -143,16 +143,31 @@ def test_config_jdbcmysql_database
def test_config_jdbcsqlite3_database
run_generator([destination_root, "-d", "jdbcsqlite3"])
assert_file "config/database.yml", /jdbcsqlite3/
assert_file "config/database.yml", /sqlite3/
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcsqlite3-adapter["']$/
end
def test_config_jdbcpostgresql_database
run_generator([destination_root, "-d", "jdbcpostgresql"])
assert_file "config/database.yml", /jdbcpostgresql/
assert_file "config/database.yml", /postgresql/
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcpostgresql-adapter["']$/
end
def test_config_jdbc_database
run_generator([destination_root, "-d", "jdbc"])
assert_file "config/database.yml", /jdbc/
assert_file "config/database.yml", /mssql/
assert_file "Gemfile", /^gem\s+["']activerecord-jdbc-adapter["']$/
end
def test_config_jdbc_database_when_no_option_given
if defined?(JRUBY_VERSION)
run_generator([destination_root])
assert_file "config/database.yml", /sqlite3/
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcsqlite3-adapter["']$/
end
end
def test_generator_if_skip_active_record_is_given
run_generator [destination_root, "--skip-active-record"]
assert_no_file "config/database.yml"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册