提交 b700d481 编写于 作者: Y yuuji.yaginuma

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`.
上级 96b9609e
......@@ -52,6 +52,16 @@ def test_api_modified_files
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
......
......@@ -413,17 +413,6 @@ def test_generator_if_skip_action_cable_is_given
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'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册