mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 20:38:47 +00:00
Extracting common methods into helper.
This commit is contained in:
@@ -3,15 +3,6 @@ require_relative "./helper"
|
||||
class TestModelines < Minitest::Test
|
||||
include Linguist
|
||||
|
||||
def fixtures_path
|
||||
File.expand_path("../fixtures", __FILE__)
|
||||
end
|
||||
|
||||
def fixture_blob(name)
|
||||
name = File.join(fixtures_path, name) unless name =~ /^\//
|
||||
FileBlob.new(name, fixtures_path)
|
||||
end
|
||||
|
||||
def assert_modeline(language, blob)
|
||||
assert_equal language, Linguist::Strategy::Modeline.call(blob).first
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user