class RuboCop::Cop::Rails::ActionControllerTestCase


end
class MyControllerTest < ActionDispatch::IntegrationTest
# good
end
class MyControllerTest < ActionController::TestCase
# bad
@example
Make sure to update each test of your controller test cases after changing the superclass.
This cop’s autocorrection is unsafe because the API of each test case class is different.
@safety
internals of a controller whereas integration tests mimic the browser/user.
‘ActionDispatch::IntegrationTest`. Controller tests are too close to the
Using `ActionController::TestCase` is discouraged and should be replaced by

def on_class(node)

def on_class(node)
  return unless action_controller_test_case?(node)
  add_offense(node.parent_class) do |corrector|
    corrector.replace(node.parent_class, 'ActionDispatch::IntegrationTest')
  end
end