| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  | describe "brew deps", :integration_test do | 
					
						
							|  |  |  |   before(:each) do | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  |     setup_test_formula "foo" | 
					
						
							|  |  |  |     setup_test_formula "bar" | 
					
						
							| 
									
										
										
										
											2017-10-15 02:28:32 +02:00
										 |  |  |     setup_test_formula "baz", <<~EOS | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  |       url "https://example.com/baz-1.0" | 
					
						
							|  |  |  |       depends_on "bar" | 
					
						
							|  |  |  |     EOS | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 05:02:41 -05:00
										 |  |  |   it "outputs no dependencies for a Formula that has no dependencies" do | 
					
						
							| 
									
										
										
										
											2017-02-23 05:25:24 -05:00
										 |  |  |     expect { brew "deps", "foo" } | 
					
						
							| 
									
										
										
										
											2017-02-24 17:21:50 -05:00
										 |  |  |       .to be_a_success | 
					
						
							|  |  |  |       .and not_to_output.to_stdout | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  |       .and not_to_output.to_stderr | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 05:02:41 -05:00
										 |  |  |   it "outputs a dependency for a Formula that has one dependency" do | 
					
						
							| 
									
										
										
										
											2017-02-23 05:25:24 -05:00
										 |  |  |     expect { brew "deps", "bar" } | 
					
						
							| 
									
										
										
										
											2017-02-24 17:21:50 -05:00
										 |  |  |       .to be_a_success | 
					
						
							|  |  |  |       .and output("foo\n").to_stdout | 
					
						
							| 
									
										
										
										
											2017-02-23 01:54:44 -05:00
										 |  |  |       .and not_to_output.to_stderr | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2017-02-21 20:14:21 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-23 05:25:24 -05:00
										 |  |  |   it "outputs all of a Formula's dependencies and their dependencies on separate lines" do | 
					
						
							|  |  |  |     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 |