add test_scoped_root_as_name

test for regression introduced by https://github.com/rails/rails/pull/9155