diff options
author | Dave Riddle <david@joyvuu.com> | 2016-01-22 20:47:37 -0800 |
---|---|---|
committer | Dave Riddle <david@joyvuu.com> | 2016-01-22 22:39:01 -0800 |
commit | 578af21a4156ff29b4c28936324c54bb1eb83d54 (patch) | |
tree | e02132389bf2ee76e67af2e408d699de7e36b5b6 /railties/test/generators | |
parent | 4fdc56d5788349522fc6d43bbab14811a9f1f29e (diff) | |
download | rails-578af21a4156ff29b4c28936324c54bb1eb83d54.tar.gz rails-578af21a4156ff29b4c28936324c54bb1eb83d54.tar.bz2 rails-578af21a4156ff29b4c28936324c54bb1eb83d54.zip |
prevent --skip-action-cable from erroring when --api option is used
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5b62b500e5..136bdd1694 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -405,6 +405,18 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_generator_if_skip_action_cable_is_given_for_an_api_app + run_generator [destination_root, "--skip-action-cable", "--api"] + assert_file "config/application.rb", /#\s+require\s+["']action_cable\/engine["']/ + assert_no_file "config/cable.yml" + assert_no_file "app/assets/javascripts/cable.coffee" + assert_no_file "app/channels" + assert_file "Gemfile" do |content| + assert_no_match(/em-hiredis/, content) + assert_no_match(/redis/, content) + end + end + def test_action_cable_redis_gems run_generator assert_gem 'em-hiredis' |