mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Bumping to v4.8.18 (#3370)
* make tests great again ✨
* version bump
* removing empty line in gemspec
This commit is contained in:
@@ -297,9 +297,9 @@ class TestLanguage < Minitest::Test
|
||||
end
|
||||
|
||||
def test_doesnt_blow_up_with_blank_lookup
|
||||
assert_equal nil, Language.find_by_alias('')
|
||||
assert_equal nil, Language.find_by_name(nil)
|
||||
assert_equal nil, Language[""]
|
||||
assert_nil Language.find_by_alias('')
|
||||
assert_nil Language.find_by_name(nil)
|
||||
assert_nil Language[""]
|
||||
end
|
||||
|
||||
def test_name
|
||||
|
||||
@@ -4,7 +4,11 @@ class TestModelines < Minitest::Test
|
||||
include Linguist
|
||||
|
||||
def assert_modeline(language, blob)
|
||||
assert_equal language, Linguist::Strategy::Modeline.call(blob).first
|
||||
if language.nil?
|
||||
assert_nil Linguist::Strategy::Modeline.call(blob).first
|
||||
else
|
||||
assert_equal language, Linguist::Strategy::Modeline.call(blob).first
|
||||
end
|
||||
end
|
||||
|
||||
def test_modeline_strategy
|
||||
|
||||
@@ -4,7 +4,11 @@ class TestShebang < Minitest::Test
|
||||
include Linguist
|
||||
|
||||
def assert_interpreter(interpreter, body)
|
||||
assert_equal interpreter, Shebang.interpreter(body)
|
||||
if interpreter.nil?
|
||||
assert_nil Shebang.interpreter(body)
|
||||
else
|
||||
assert_equal interpreter, Shebang.interpreter(body)
|
||||
end
|
||||
end
|
||||
|
||||
def test_shebangs
|
||||
|
||||
Reference in New Issue
Block a user