I considered that, but it relies on `ENV['RAILS_ENV']` for the check, which gets only assigned by `set_environment` when a `Rails::Server` instance is initialized. I don't see a way to pass command line args (`-e development`) to `Rails::Server.new`; apparently this is only possible by starting the server. This would then be very difficult to write a test for.

Maybe you see a better solution which is more DRY?