| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-04 12:59:56 +01:00
										 |  |  | require "cmd/shared_examples/args_parse" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe "Homebrew.deps_args" do | 
					
						
							|  |  |  |   it_behaves_like "parseable arguments" | 
					
						
							|  |  |  | end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  | describe "brew deps", :integration_test do | 
					
						
							| 
									
										
										
										
											2019-03-28 08:35:36 +00:00
										 |  |  |   it "outputs all of a Formula's dependencies and their dependencies on separate lines" do | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  |     setup_test_formula "foo" | 
					
						
							|  |  |  |     setup_test_formula "bar" | 
					
						
							| 
									
										
										
										
											2018-07-11 15:17:40 +02:00
										 |  |  |     setup_test_formula "baz", <<~RUBY | 
					
						
							| 
									
										
										
										
											2018-11-28 20:51:55 +01:00
										 |  |  |       url "https://brew.sh/baz-1.0" | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  |       depends_on "bar" | 
					
						
							| 
									
										
										
										
											2018-07-11 15:17:40 +02:00
										 |  |  |     RUBY | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 05:25:24 -05:00
										 |  |  |     expect { brew "deps", "baz" } | 
					
						
							| 
									
										
										
										
											2017-02-24 17:21:50 -05:00
										 |  |  |       .to be_a_success | 
					
						
							|  |  |  |       .and output("bar\nfoo\n").to_stdout | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  |       .and not_to_output.to_stderr | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  |   end | 
					
						
							|  |  |  | end |