Load Git Attributes for Linguist-specific overrides

This commit is contained in:
Vicent Marti
2014-09-10 16:59:43 +02:00
committed by The rugged tests are fragile
parent 16c1aa2845
commit 3d39e842ec
3 changed files with 43 additions and 1 deletions

View File

@@ -47,4 +47,18 @@ class TestRepository < Test::Unit::TestCase
assert_equal linguist_repo.cache, new_repo.cache
end
def test_git_attributes
attr_commit = '525304738ebdb7ab3b7d2bf9a7514cc428faa273'
repo = linguist_repo(attr_commit)
assert repo.breakdown_by_file.has_key?("Java")
assert repo.breakdown_by_file["Java"].include?("lib/linguist.rb")
assert repo.breakdown_by_file.has_key?("Ruby")
assert !repo.breakdown_by_file["Ruby"].empty?
repo.breakdown_by_file["Ruby"].each do |file|
assert !file.start_with?("test/")
end
end
end