aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-02-02 04:44:23 -0200
committerRafael França <rafaelmfranca@gmail.com>2016-02-02 04:44:23 -0200
commit2c7bc9251c41db15514fba6b9c03e41cd6232433 (patch)
tree4b84129ccd8136f67df3b24b8eb94bc01799e5eb /railties
parentdd041934ddae85056912e6245bd415a981d65c8c (diff)
parentb700d4811dbc1ba5efcfd618f8ee0bf0b9e22d4c (diff)
downloadrails-2c7bc9251c41db15514fba6b9c03e41cd6232433.tar.gz
rails-2c7bc9251c41db15514fba6b9c03e41cd6232433.tar.bz2
rails-2c7bc9251c41db15514fba6b9c03e41cd6232433.zip
Merge pull request #23420 from y-yagi/move_api_test_to_appropriate_file
move `test_generator_if_skip_action_cable_is_given_for_an_api_app` to the appropriate file
Diffstat (limited to 'railties')
-rw-r--r--railties/test/generators/api_app_generator_test.rb10
-rw-r--r--railties/test/generators/app_generator_test.rb11
2 files changed, 10 insertions, 11 deletions
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'