diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2017-01-01 15:16:39 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2017-01-01 15:16:39 +0530 |
commit | 7bb52d27813c33e967b8de2fe7889f3be236ac25 (patch) | |
tree | e551f9486a48a938d65e2307bafea262d828bad4 /railties/test/generators | |
parent | 5053d5251fb8c03e666f1f8b765464ec33e3066e (diff) | |
download | rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.tar.gz rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.tar.bz2 rails-7bb52d27813c33e967b8de2fe7889f3be236ac25.zip |
Remove bin/yarn if yarn is skipped, tidy up tests
- No need to remove bin/yarn separately for API only apps because
:skip_yarn is set to true for API only apps.
- Added a test for :skip_yarn config.
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 079ee3765c..20de2258c5 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -419,6 +419,13 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_generator_if_skip_yarn_is_given + run_generator [destination_root, "--skip-yarn"] + + assert_no_file "vendor/package.json" + assert_no_file "bin/yarn" + end + def test_generator_if_skip_action_cable_is_given run_generator [destination_root, "--skip-action-cable"] assert_file "config/application.rb", /#\s+require\s+["']action_cable\/engine["']/ |