| 
									
										
										
										
											2018-04-05 14:48:35 -07:00
										 |  |  | require "utils/curl" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe "curl" do | 
					
						
							|  |  |  |   describe "curl_args" do | 
					
						
							| 
									
										
										
										
											2018-04-09 15:43:03 -07:00
										 |  |  |     it "returns -q as the first argument when HOMEBREW_CURLRC is not set" do | 
					
						
							| 
									
										
										
										
											2018-04-05 14:48:35 -07:00
										 |  |  |       # -q must be the first argument according to "man curl" | 
					
						
							| 
									
										
										
										
											2018-07-30 10:11:00 +02:00
										 |  |  |       expect(curl_args("foo").first).to eq("-q") | 
					
						
							| 
									
										
										
										
											2018-04-05 14:48:35 -07:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2018-04-08 16:07:21 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-04-09 15:43:03 -07:00
										 |  |  |     it "doesn't return -q as the first argument when HOMEBREW_CURLRC is set" do | 
					
						
							|  |  |  |       ENV["HOMEBREW_CURLRC"] = "1" | 
					
						
							| 
									
										
										
										
											2018-07-30 10:11:00 +02:00
										 |  |  |       expect(curl_args("foo").first).to_not eq("-q") | 
					
						
							| 
									
										
										
										
											2018-04-08 16:07:21 -07:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2018-04-05 14:48:35 -07:00
										 |  |  |   end | 
					
						
							|  |  |  | end |