rails/rails-controller-testing

Eagerly loading AV::TestCase breaks routing

matthewd opened this issue · 2 comments

After adding rails-controller-testing to a Gemfile, bundler will automatically require it.

That causes these lines to run, which in turn triggers the autoload on ActionView::TestCase.

That means we run this line too early, before this initializer has executed... which means AV tests miss out on all the route helpers.

@sgrif 69068e0 doesn't seem to fix this for me... I think because the ActionController on_load can still fire before the initializer is run?

sgrif commented

Odd. The issue I was resolving is exactly what you've described, and it fixed it for me.