| 
									
										
										
										
											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 IntegrationCommandTestLogFormula < IntegrationCommandTestCase | 
					
						
							| 
									
										
										
										
											2016-09-26 19:55:50 +02:00
										 |  |  |   def test_log_formula | 
					
						
							|  |  |  |     core_tap = CoreTap.new | 
					
						
							|  |  |  |     setup_test_formula "testball" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     core_tap.path.cd do | 
					
						
							|  |  |  |       shutup do | 
					
						
							|  |  |  |         system "git", "init" | 
					
						
							|  |  |  |         system "git", "add", "--all" | 
					
						
							|  |  |  |         system "git", "commit", "-m", "This is a test commit for Testball" | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     core_tap_url = "file://#{core_tap.path}" | 
					
						
							|  |  |  |     shallow_tap = Tap.fetch("homebrew", "shallow") | 
					
						
							|  |  |  |     shutup do | 
					
						
							|  |  |  |       system "git", "clone", "--depth=1", core_tap_url, shallow_tap.path | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     assert_match "This is a test commit for Testball", | 
					
						
							|  |  |  |                  cmd("log", "#{shallow_tap}/testball") | 
					
						
							|  |  |  |     assert_predicate shallow_tap.path/".git/shallow", :exist?, | 
					
						
							|  |  |  |                      "A shallow clone should have been created." | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |