def env_for(env, options = {}, params = nil)
      env = case env
      when String
        Rack::MockRequest.env_for(env, options)
      when Symbol
        begin
          url = path(env, params || options)
          return env_for(url, options)
        rescue Hanami::Routing::InvalidRouteException
          {}
        end
      else
        env
      end
    end
def env_for(env, options = {}, params = nil)
      env = case env
      when String
        Rack::MockRequest.env_for(env, options)
      when Symbol
        begin
          url = path(env, params || options)
          return env_for(url, options)
        rescue Hanami::Routing::InvalidRouteException
          {}
        end
      else
        env
      end
    end
Fabricate Rack env for the given Rack env, path or named route

 @param env [Hash, String, Symbol] Rack env, path or route name
 @param options [Hash] a set of options for Rack env or route params
 @param params [Hash] a set of params

 @return [Hash] Rack env

 @since 0.5.0
 @api private

 @see Hanami::Router#recognize
 @see http://www.rubydoc.info/github/rack/rack/Rack%2FMockRequest.env_for