Some slight test improvements

This commit is contained in:
Garen Torikian
2015-04-06 09:43:36 -07:00
parent 63e017fbaa
commit 6bd8d3a3b7

View File

@@ -4,7 +4,7 @@ class TestColorProximity < Minitest::Test
include Linguist include Linguist
def cut_hash(color) def cut_hash(color)
color[1..-1] color[1..-1] if color.start_with?('#')
end end
def test_color_proximity def test_color_proximity
@@ -16,7 +16,7 @@ class TestColorProximity < Minitest::Test
"- #{lang} (#{lang.color}) is too close to #{state.last}" "- #{lang} (#{lang.color}) is too close to #{state.last}"
end end
end.compact end.compact
message = "The following languages have failing color thresholds. Please modify the hex color.\n#{failing_threshold.join("\n")}" message = "The following #{failing_threshold.length} languages have failing color thresholds. Please modify the hex color.\n#{failing_threshold.join("\n")}"
assert failing_threshold.empty?, message assert failing_threshold.empty?, message
end end