From b700d4811dbc1ba5efcfd618f8ee0bf0b9e22d4c Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Tue, 2 Feb 2016 15:36:12 +0900 Subject: move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to the appropriate file Test of Rails API should be in `api_app_generator_test.rb`. --- railties/test/generators/api_app_generator_test.rb | 10 ++++++++++ railties/test/generators/app_generator_test.rb | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) (limited to 'railties/test') diff --git a/railties/test/generators/api_app_generator_test.rb b/railties/test/generators/api_app_generator_test.rb index d9eb7770f3..1ea5661006 100644 --- a/railties/test/generators/api_app_generator_test.rb +++ b/railties/test/generators/api_app_generator_test.rb @@ -52,6 +52,16 @@ class ApiAppGeneratorTest < Rails::Generators::TestCase assert_file "app/controllers/application_controller.rb", /ActionController::API/ 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["']/ + assert_no_file "config/cable.yml" + assert_no_file "app/channels" + assert_file "Gemfile" do |content| + assert_no_match(/redis/, content) + end + end + private def default_files diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 937f68fff8..9595d2a0ef 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -413,17 +413,6 @@ 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(/redis/, content) - end - end - def test_action_cable_redis_gems run_generator assert_gem 'redis' -- cgit v1.2.3