mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Remove mime type from blob
This commit is contained in:
@@ -16,11 +16,6 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
@name
|
@name
|
||||||
end
|
end
|
||||||
|
|
||||||
def mime_type
|
|
||||||
guesses = ::MIME::Types.type_for(name)
|
|
||||||
orginal_type = guesses.first ? guesses.first.simplified : 'text/plain'
|
|
||||||
end
|
|
||||||
|
|
||||||
def data
|
def data
|
||||||
File.read(@path)
|
File.read(@path)
|
||||||
end
|
end
|
||||||
@@ -39,7 +34,9 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_mime_type
|
def test_mime_type
|
||||||
assert_equal "application/ruby", blob("foo.rb").mime_type
|
assert_equal "text/plain; charset=utf-8", blob("grit.rb").mime_type
|
||||||
|
assert_equal "text/plain; charset=utf-8", blob("bar.xml").mime_type
|
||||||
|
assert_equal "application/octet-stream", blob("dog.o").mime_type
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_data
|
def test_data
|
||||||
|
|||||||
Reference in New Issue
Block a user