This commit is contained in:
dx-mon
2014-07-14 22:08:16 +01:00
47 changed files with 4775 additions and 10961 deletions

View File

@@ -1,6 +1,7 @@
require 'linguist/heuristics'
require 'linguist/language'
require 'linguist/samples'
require 'linguist/file_blob'
require 'test/unit'
@@ -44,7 +45,8 @@ class TestHeuristcs < Test::Unit::TestCase
end
def test_detect_still_works_if_nothing_matches
match = Language.detect("Hello.m", fixture("Objective-C/hello.m"))
blob = Linguist::FileBlob.new(File.join(samples_path, "Objective-C/hello.m"))
match = Language.detect(blob)
assert_equal Language["Objective-C"], match
end