Permalink
Browse files

3-0-stable fix test when running Jruby. If Jruby Platform is availabl…

…e the gem will change.
  • Loading branch information...
vishnuatrai committed Jun 29, 2011
1 parent 0ed8dea commit 557d788792b84e751de9c780f09cf952738a81bb
Showing with 12 additions and 4 deletions.
  1. +12 −4 railties/test/generators/app_generator_test.rb
@@ -154,15 +154,23 @@ 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/
- # Ensure that the mysql2 gem is listed with a compatible version of the
- # mysql2 gem
- assert_file "Gemfile", /^gem\s+["']mysql2["'],\s*'~> 0.2.11'$/
+ unless defined?(JRUBY_VERSION)
+ # Ensure that the mysql2 gem is listed with a compatible version of the
+ # mysql2 gem
+ assert_file "Gemfile", /^gem\s+["']mysql2["'],\s*'~> 0.2.11'$/
+ else
+ assert_file "Gemfile", /^gem\s+["']activerecord-jdbcmysql-adapter["']$/
+ end
end
def test_config_jdbcmysql_database

0 comments on commit 557d788

Please sign in to comment.