Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test when running Jruby. If Jruby Platform is available the gem will #1886

Merged
merged 1 commit into from Jun 28, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions railties/test/generators/app_generator_test.rb
Expand Up @@ -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
Expand Down