add test_scoped_root_as_name

test for regression introduced by https://github.com/rails/rails/pull/9155
Merge pull request #12337 from rubys/route-formatter-test

add test_scoped_root_as_name
Use join to concat the both side of the AST

Onf of the sides can be nil and it will raise a Conversion error