aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorArun Agrawal <arun@fromjaipur.com>2011-06-22 08:43:34 +0530
committerArun Agrawal <arun@fromjaipur.com>2011-06-22 08:43:34 +0530
commit3534ea8d50638c32b8e7fb46d1d3767912f7b480 (patch)
tree06ca8311a6891022df3b055d60a2476e755b9e0c /railties/test/generators
parentb2a19ad90b9f542b7800e163c56943f48b97f822 (diff)
downloadrails-3534ea8d50638c32b8e7fb46d1d3767912f7b480.tar.gz
rails-3534ea8d50638c32b8e7fb46d1d3767912f7b480.tar.bz2
rails-3534ea8d50638c32b8e7fb46d1d3767912f7b480.zip
Tests added when no option is given with #jruby. It should generate
sqlite3 based app
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 92d5cd77dc..03d185165f 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -160,6 +160,14 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_file "Gemfile", /^gem\s+["']activerecord-jdbc-adapter["']$/
end
+ def test_config_jdbc_database_when_no_option_given
+ if defined?(JRUBY_VERSION)
+ run_generator([destination_root])
+ assert_file "config/database.yml", /sqlite3/
+ assert_file "Gemfile", /^gem\s+["']activerecord-jdbcsqlite3-adapter["']$/
+ end
+ end
+
def test_generator_if_skip_active_record_is_given
run_generator [destination_root, "--skip-active-record"]
assert_no_file "config/database.yml"