diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-16 22:53:37 +0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-17 01:59:51 +0800 |
commit | 114fa4d43121cd05fc18a8449a4d1abd92978a72 (patch) | |
tree | b282b8711eaaf71c0778ca9a47a3e0f74bc281c2 /railties/test/generators | |
parent | ea7f1fb026a384a2b39362aa179ebfa0ba14a816 (diff) | |
download | rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.tar.gz rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.tar.bz2 rails-114fa4d43121cd05fc18a8449a4d1abd92978a72.zip |
Adds application.js when app is generated with -J and clear javascript_expansions[:defaults]
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 6a3b5de9de..9d7a976afd 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -129,14 +129,19 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_prototype_and_test_unit_are_added_by_default run_generator + assert_file "config/application.rb", /#\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+%w\(jquery rails\)/ + assert_file "public/javascripts/application.js" assert_file "public/javascripts/prototype.js" + assert_file "public/javascripts/rails.js" assert_file "test" end def test_prototype_and_test_unit_are_skipped_if_required run_generator [destination_root, "--skip-prototype", "--skip-testunit"] + assert_file "config/application.rb", /^\s+config\.action_view\.javascript_expansions\[:defaults\]\s+=\s+\[\]/ + assert_file "public/javascripts/application.js" assert_no_file "public/javascripts/prototype.js" - assert_file "public/javascripts" + assert_no_file "public/javascripts/rails.js" assert_no_file "test" end |