mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Move tests to blob
This commit is contained in:
@@ -49,4 +49,22 @@ class TestBlob < Test::Unit::TestCase
|
|||||||
def test_size
|
def test_size
|
||||||
assert_equal 15, blob("foo.rb").size
|
assert_equal 15, blob("foo.rb").size
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_file
|
||||||
|
assert blob("octocat.png").file?
|
||||||
|
assert blob("linguist.gem").file?
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_text
|
||||||
|
assert blob("file.txt").text?
|
||||||
|
assert blob("file.json").text?
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_image
|
||||||
|
assert blob("octocat.png").image?
|
||||||
|
assert blob("octocat.jpg").image?
|
||||||
|
assert blob("octocat.jpeg").image?
|
||||||
|
assert blob("octocat.gif").image?
|
||||||
|
assert !blob("octocat.psd").image?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -63,22 +63,4 @@ class TestPathname < Test::Unit::TestCase
|
|||||||
assert_equal 'text', Pathname.new("file.txt").media_type
|
assert_equal 'text', Pathname.new("file.txt").media_type
|
||||||
assert_equal 'text', Pathname.new("defun.kt").media_type
|
assert_equal 'text', Pathname.new("defun.kt").media_type
|
||||||
end
|
end
|
||||||
|
|
||||||
# def test_file
|
|
||||||
# assert Pathname.new("octocat.png").file?
|
|
||||||
# assert Pathname.new("linguist.gem").file?
|
|
||||||
# end
|
|
||||||
|
|
||||||
# def test_text
|
|
||||||
# assert Pathname.new("file.txt").text?
|
|
||||||
# assert Pathname.new("file.json").text?
|
|
||||||
# end
|
|
||||||
|
|
||||||
# def test_image
|
|
||||||
# assert Pathname.new("octocat.png").image?
|
|
||||||
# assert Pathname.new("octocat.jpg").image?
|
|
||||||
# assert Pathname.new("octocat.jpeg").image?
|
|
||||||
# assert Pathname.new("octocat.gif").image?
|
|
||||||
# assert !Pathname.new("octocat.psd").image?
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user