| 
									
										
										
										
											2016-10-24 22:53:25 +02:00
										 |  |  | require "testing_env" | 
					
						
							| 
									
										
										
										
											2016-09-26 19:55:50 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-27 00:03:40 +02:00
										 |  |  | class IntegrationCommandTestDesc < IntegrationCommandTestCase | 
					
						
							| 
									
										
										
										
											2016-09-26 19:55:50 +02:00
										 |  |  |   def test_desc | 
					
						
							|  |  |  |     setup_test_formula "testball" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     assert_equal "testball: Some test", cmd("desc", "testball") | 
					
						
							|  |  |  |     assert_match "Pick one, and only one", cmd_fail("desc", "--search", "--name") | 
					
						
							|  |  |  |     assert_match "You must provide a search term", cmd_fail("desc", "--search") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     desc_cache = HOMEBREW_CACHE/"desc_cache.json" | 
					
						
							|  |  |  |     refute_predicate desc_cache, :exist?, "Cached file should not exist" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     cmd("desc", "--description", "testball") | 
					
						
							|  |  |  |     assert_predicate desc_cache, :exist?, "Cached file should not exist" | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |