提交 ff9566ca 编写于 作者: S Santiago Pastorino

Merge pull request #1886 from arunagw/fix_test_for_jruby_db

fix test when running Jruby. If Jruby Platform is available the gem will 
......@@ -124,13 +124,21 @@ def test_application_names_are_not_singularized
def test_config_database_is_added_by_default
run_generator
assert_file "config/database.yml", /sqlite3/
assert_file "Gemfile", /^gem\s+["']sqlite3["']$/
unless defined?(JRUBY_VERSION)
assert_file "Gemfile", /^gem\s+["']sqlite3["']$/
else
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcsqlite3-adapter["']$/
end
end
def test_config_another_database
run_generator([destination_root, "-d", "mysql"])
assert_file "config/database.yml", /mysql/
assert_file "Gemfile", /^gem\s+["']mysql2["']$/
unless defined?(JRUBY_VERSION)
assert_file "Gemfile", /^gem\s+["']mysql2["']$/
else
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcmysql-adapter["']$/
end
end
def test_config_jdbcmysql_database
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册