Tests for BlobHelper#empty?

This commit is contained in:
Brandon Keepers
2014-11-06 15:14:03 -06:00
parent a0cc2c4c86
commit 33d75d9623

View File

@@ -488,4 +488,13 @@ class TestBlob < Test::Unit::TestCase
def test_colorize_doesnt_blow_up_with_files_with_high_ratio_of_long_lines
assert_nil blob("JavaScript/steelseries-min.js").colorize
end
def test_empty
blob = Struct.new(:data) { include Linguist::BlobHelper }
assert blob.new("").empty?
assert blob.new(nil).empty?
refute blob.new(" ").empty?
refute blob.new("nope").empty?
end
end