diff options
author | José Valim <jose.valim@gmail.com> | 2011-10-12 11:37:09 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-10-12 11:37:09 -0700 |
commit | f6c93495650ac9ff400d59ba91287876088e6d11 (patch) | |
tree | e4a2becc50fbe80c6c5620d3f39518911689c3e0 /railties | |
parent | 2cb2ca68b1973ddd202b094599521e4adc39a217 (diff) | |
parent | 84672b0c9d8ff67d5c15c74adc7d02f758b46558 (diff) | |
download | rails-f6c93495650ac9ff400d59ba91287876088e6d11.tar.gz rails-f6c93495650ac9ff400d59ba91287876088e6d11.tar.bz2 rails-f6c93495650ac9ff400d59ba91287876088e6d11.zip |
Merge pull request #3287 from sgerrand/vendor_assets_javascripts_should_be_created
Ensure that the directory 'vendor/assets/javascripts' is created by AppGenerator
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 5 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 9cbda6649d..c8648d19f8 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -122,10 +122,15 @@ module Rails end def vendor + vendor_javascripts vendor_stylesheets vendor_plugins end + def vendor_javascripts + empty_directory_with_gitkeep "vendor/assets/javascripts" + end + def vendor_stylesheets empty_directory_with_gitkeep "vendor/assets/stylesheets" end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 1b48c80042..f951f4f633 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -203,6 +203,11 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file 'test' end + def test_creation_of_vendor_assets_javascripts_directory + run_generator + assert_file "vendor/assets/javascripts" + end + def test_jquery_is_the_default_javascript_library run_generator assert_file "app/assets/javascripts/application.js" do |contents| |