An issue with reusing the TestResponse
object occurs with Ruby 2.6 and
causes already initialized
exceptions to be thrown.
This monkey-patch fixes this for Rails 4.2.
It's expected that Rails 4.2 will be dropped by administrate when Rails 6 is released, and this patch should be removed.