The new integration tests looked like a good way to test render_component actions, which was not possible with normal functional tests. However, when trying this, render_component would use the controller it was called from and not the one specified.
For example, I am using render_component in an Instiki page to display an event schedule. So even though render_component was correctly using EventsController in real use, when the same code was executed from an ActionController::IntegrationTest class, render_component was incorrectly using WikiController.
The problem it turns out was that new_with_capture in integration.rb was caching the last controller:
self.last_instantiation ||= new_without_capture(*args)
The fix is to add a check that the class of the last controller is the same as the one we are creating.