@@ -199,15 +199,15 @@ def with_format(*formats)
199199 # To specify a protocol, pass the protocol param:
200200 #
201201 # ```ruby
202- # with_request_url("/users/42", protocol: " https" ) do
202+ # with_request_url("/users/42", protocol: : https) do
203203 # render_inline(MyComponent.new)
204204 # end
205205 # ```
206206 #
207207 # @param full_path [String] The path to set for the current request.
208208 # @param host [String] The host to set for the current request.
209209 # @param method [String] The request method to set for the current request.
210- # @param protocol [String ] The protocol to set for the current request (e.g., " http" or " https" ).
210+ # @param protocol [Symbol ] The protocol to set for the current request (e.g., `: http` or `: https` ).
211211 def with_request_url ( full_path , host : nil , method : nil , protocol : nil )
212212 old_request_host = vc_test_request . host
213213 old_request_method = vc_test_request . request_method
@@ -224,7 +224,7 @@ def with_request_url(full_path, host: nil, method: nil, protocol: nil)
224224 vc_test_request . instance_variable_set ( :@original_fullpath , full_path )
225225 vc_test_request . host = host if host
226226 vc_test_request . request_method = method if method
227- vc_test_request . set_header ( Rack ::RACK_URL_SCHEME , protocol ) if protocol
227+ vc_test_request . set_header ( Rack ::RACK_URL_SCHEME , protocol . to_s ) if protocol
228228 vc_test_request . path_info = path
229229 vc_test_request . path_parameters = Rails . application . routes . recognize_path_with_request ( vc_test_request , path , { } )
230230 vc_test_request . set_header ( "action_dispatch.request.query_parameters" ,
0 commit comments