Extracting common methods into helper.

This commit is contained in:
Arfon Smith
2015-01-26 16:22:55 -06:00
parent 20a3e7e4b8
commit 69b68f3a44
7 changed files with 18 additions and 43 deletions

View File

@@ -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