Lock to mime types 1.15

This commit is contained in:
Joshua Peek
2011-05-13 13:59:39 -05:00
parent 28e36b279d
commit 0f1a303c63
3 changed files with 8 additions and 8 deletions

View File

@@ -3,5 +3,5 @@ Gem::Specification.new do |s|
s.version = '0.0.1'
s.summary = "GitHub Language detection"
s.add_dependency 'mime-types'
s.add_dependency 'mime-types', '1.15'
end

View File

@@ -6,9 +6,9 @@ class TestMime < Test::Unit::TestCase
include Linguist
def test_lookup
assert_equal 'application/ruby', Mime.lookup(".rb")
assert_equal 'application/javascript', Mime.lookup(".js")
assert_equal 'application/python', Mime.lookup(".py")
assert_equal 'text/plain; charset=utf-8', Mime.lookup(".rb")
assert_equal 'text/plain; charset=utf-8', Mime.lookup(".js")
assert_equal 'text/plain; charset=utf-8', Mime.lookup(".py")
assert_equal 'text/plain; charset=utf-8', Mime.lookup(".kt")
assert_equal 'text/plain; charset=utf-8', Mime.lookup(".html")

View File

@@ -52,14 +52,14 @@ class TestPathname < Test::Unit::TestCase
end
def test_mime_type
assert_equal 'application/ruby', Pathname.new("file.rb").mime_type
assert_equal 'application/javascript', Pathname.new("file.js").mime_type
assert_equal 'application/python', Pathname.new("itty.py").mime_type
assert_equal 'text/plain; charset=utf-8', Pathname.new("file.rb").mime_type
assert_equal 'text/plain; charset=utf-8', Pathname.new("file.js").mime_type
assert_equal 'text/plain; charset=utf-8', Pathname.new("itty.py").mime_type
assert_equal 'text/plain; charset=utf-8', Pathname.new("defun.kt").mime_type
end
def test_media_type
assert_equal 'application', Pathname.new("file.js").media_type
assert_equal 'text', Pathname.new("file.js").media_type
assert_equal 'text', Pathname.new("file.txt").media_type
assert_equal 'text', Pathname.new("defun.kt").media_type
end