diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2013-10-27 10:43:17 +0100 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2013-10-27 18:44:03 +0100 |
commit | 84e261b9309d362a210ed55941f2852ec4230038 (patch) | |
tree | d7316103b05cc716516adf3670e11404d0379a42 /railties/test | |
parent | f230dbf6990fe4d2b7d33ef2caa3715a33bc0328 (diff) | |
download | rails-84e261b9309d362a210ed55941f2852ec4230038.tar.gz rails-84e261b9309d362a210ed55941f2852ec4230038.tar.bz2 rails-84e261b9309d362a210ed55941f2852ec4230038.zip |
Removal of javascript related gems when creating an app
Commit 0417bc8 add the coffee-rails and javascript runtime gems even
when passing the --skip-javascript option but this is not the desired
behavior.
Also remove all javascript related stuff in the generated application
such as the vendor/assets/javascripts folder.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 24f01c878c..9b0c9ebf5b 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -298,15 +298,17 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_javascript_is_skipped_if_required run_generator [destination_root, "--skip-javascript"] - assert_file "app/assets/javascripts/application.js" do |contents| - assert_no_match %r{^//=\s+require\s}, contents - end + + assert_no_file "app/assets/javascripts" + assert_no_file "vendor/assets/javascripts" + assert_file "app/views/layouts/application.html.erb" do |contents| assert_match(/stylesheet_link_tag\s+"application", media: "all" %>/, contents) - assert_match(/javascript_include_tag\s+"application" \%>/, contents) + assert_no_match(/javascript_include_tag\s+"application" \%>/, contents) end + assert_file "Gemfile" do |content| - assert_match(/coffee-rails/, content) + assert_no_match(/coffee-rails/, content) end end |