From 04179de2f692406397a5134532983a37249700d9 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 6 Jul 2011 10:18:01 -0500 Subject: [PATCH] Note where tests are --- lib/linguist/blob_helper.rb | 15 +++++++++++++++ lib/linguist/languages.yml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 77dffe2f..4e013bd7 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -173,6 +173,9 @@ module Linguist # - XCode project XML files # - Minified JavaScript # + # Please add additional test coverage to + # `test/test_blob.rb#test_generated` if you make any changes. + # # Return true or false def generated? if ['.xib', '.nib', '.pbxproj'].include?(extname) @@ -239,6 +242,9 @@ module Linguist # - Langauges marked as not searchable # - Generated source files # + # Please add additional test coverage to + # `test/test_blob.rb#test_indexable` if you make any changes. + # # Return true or false def indexable? if binary? @@ -271,6 +277,9 @@ module Linguist # Internal: Guess language # + # Please add additional test coverage to + # `test/test_blob.rb#test_language` if you make any changes. + # # Returns a Language or nil def guess_language return if binary? @@ -299,6 +308,9 @@ module Linguist # # Delegates to "guess_EXTENSION_language". # + # Please add additional test coverage to + # `test/test_blob.rb#test_language` if you add another method. + # # Returns a Language or nil. def disambiguate_extension_language if Language.ambiguous?(extname) @@ -408,6 +420,9 @@ module Linguist # '#!/usr/bash/python2.4' # # => 'python' # + # Please add additional test coverage to + # `test/test_blob.rb#test_shebang_script` if you make any changes. + # # Returns a script name String or nil def shebang_script # Fail fast if blob isn't viewable? diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 4efcc656..70f702c7 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -16,7 +16,7 @@ # different alias. Avoid defining new exceptions. # # Any additions or modifications (even trivial) should have corresponding -# test change in `test/test_language.rb`. +# test change in `test/test_blob.rb`. # # Please keep this list alphabetized.