Moved the check for the rails test environment into rails/test_unit so that you
can select frameworks separately when running rake test.
Merge pull request #10256 from wangjohn/moving_check_for_test_environment_into_rails_env

Moved the check for the rails test environment into rails.rb

Closes #10238