[#8743] Test case

- Reverting #a3cf03ef99 fixes the issue

Conflicts:
	activerecord/test/cases/relations_test.rb
Don't use Rails.root since it is not available at this point