mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	A different approach
This commit is contained in:
		@@ -69,15 +69,16 @@ class TestRepository < Test::Unit::TestCase
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def test_commit_with_git_attributes_data
 | 
					  def test_commit_with_git_attributes_data
 | 
				
			||||||
    old_commit = '3d7364877d6794f6cc2a86b493e893968a597332'
 | 
					    # Before we had any .gitattributes data
 | 
				
			||||||
 | 
					    old_commit = '4a017d9033f91b2776eb85275463f9613cc371ef'
 | 
				
			||||||
    old_repo = linguist_repo(old_commit)
 | 
					    old_repo = linguist_repo(old_commit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # With some .gitattributes data
 | 
				
			||||||
    attr_commit = '7ee006cbcb2d7261f9e648510a684ee9ac64126b'
 | 
					    attr_commit = '7ee006cbcb2d7261f9e648510a684ee9ac64126b'
 | 
				
			||||||
 | 
					    # It's incremental but should bust the cache
 | 
				
			||||||
    new_repo = Linguist::Repository.incremental(rugged_repository, attr_commit, old_commit, old_repo.cache)
 | 
					    new_repo = Linguist::Repository.incremental(rugged_repository, attr_commit, old_commit, old_repo.cache)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Rugged::Tree.expects(:diff).twice
 | 
					    assert new_repo.breakdown_by_file["Java"].include?("lib/linguist.rb")
 | 
				
			||||||
 | 
					 | 
				
			||||||
    new_repo.send(:compute_stats, old_commit, old_repo.cache)
 | 
					 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def test_linguist_override_vendored?
 | 
					  def test_linguist_override_vendored?
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user