aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorArun Agrawal <arun@fromjaipur.com>2011-06-29 02:41:52 +0530
committerArun Agrawal <arun@fromjaipur.com>2011-06-29 02:41:52 +0530
commit2b046e7c39da1350e13ae54a7f07cdfb4c62bba8 (patch)
tree174e0623e6e443f815ef62aee6cd5a8d26dbbcca /railties/test/generators
parent941d5c1f4051416e1b7993374343e343027978a7 (diff)
downloadrails-2b046e7c39da1350e13ae54a7f07cdfb4c62bba8.tar.gz
rails-2b046e7c39da1350e13ae54a7f07cdfb4c62bba8.tar.bz2
rails-2b046e7c39da1350e13ae54a7f07cdfb4c62bba8.zip
fix test when running Jruby. If Jruby Platform is available the gem will change.
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 86217f4ab9..eb60674a03 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -124,13 +124,21 @@ class AppGeneratorTest < Rails::Generators::TestCase
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