| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-01 10:05:02 -07:00
										 |  |  | require "cmd/readall" | 
					
						
							| 
									
										
										
										
											2019-03-28 08:35:36 +00:00
										 |  |  | require "cmd/shared_examples/args_parse" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-01 10:05:02 -07:00
										 |  |  | RSpec.describe Homebrew::Cmd::ReadallCmd do | 
					
						
							| 
									
										
										
										
											2019-03-28 08:35:36 +00:00
										 |  |  |   it_behaves_like "parseable arguments" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-01 16:14:25 -05:00
										 |  |  |   it "imports all Formulae for a given Tap", :integration_test do | 
					
						
							| 
									
										
										
										
											2017-02-23 06:03:25 +01:00
										 |  |  |     formula_file = setup_test_formula "testball" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-06 15:10:14 +01:00
										 |  |  |     alias_file = CoreTap.instance.alias_dir/"foobar" | 
					
						
							| 
									
										
										
										
											2017-02-23 06:03:25 +01:00
										 |  |  |     alias_file.parent.mkpath | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     FileUtils.ln_s formula_file, alias_file | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-27 14:01:22 +01:00
										 |  |  |     expect { brew "readall", "--aliases", "--syntax", CoreTap.instance.name } | 
					
						
							| 
									
										
										
										
											2017-02-23 06:03:25 +01:00
										 |  |  |       .to be_a_success | 
					
						
							|  |  |  |       .and not_to_output.to_stdout | 
					
						
							|  |  |  |       .and not_to_output.to_stderr | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |