Skip to content
Browse files

Merge pull request #1895 from arunagw/fix_test_for_jruby_db-3-1-stable

Fix test for jruby db 3 1 stable
  • Loading branch information...
2 parents afe8eb5 + df5971d commit 01d881cb3efc42c243a37e658ff20c2d1e1e2046 @spastorino spastorino committed Jul 6, 2011
Showing with 10 additions and 2 deletions.
  1. +10 −2 railties/test/generators/app_generator_test.rb
View
12 railties/test/generators/app_generator_test.rb
@@ -125,13 +125,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

0 comments on commit 01d881c

Please sign in to comment.
Something went wrong with that request. Please try again.