Skip to content

Commit

Permalink
3-0-stable fix test when running Jruby. If Jruby Platform is availabl…
Browse files Browse the repository at this point in the history
…e the gem will change.
  • Loading branch information
Vishnu Atrai committed Jun 29, 2011
1 parent 0ed8dea commit 557d788
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions railties/test/generators/app_generator_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 557d788

Please sign in to comment.