Files
jekyll/test/test_ansi.rb
Ashwin Maroli 506c764e1e fix incorrectly passed arguments to assert_equal (#7134)
Merge pull request 7134
2018-07-15 16:11:45 -04:00

26 lines
554 B
Ruby

# frozen_string_literal: true
require "helper"
class TestAnsi < JekyllUnitTest
context nil do
setup do
@subject = Jekyll::Utils::Ansi
end
Jekyll::Utils::Ansi::COLORS.each_key do |color|
should "respond_to? #{color}" do
assert @subject.respond_to?(color)
end
end
should "be able to strip colors" do
assert_equal "hello", @subject.strip(@subject.yellow(@subject.red("hello")))
end
should "be able to detect colors" do
assert @subject.has?(@subject.yellow("hello"))
end
end
end