https://github.com/jekyll/jekyll
Raw File
Tip revision: b8d76f9ee106f7fd97e6b3eb48a3a17a96795dfe authored by dependabot[bot] on 22 October 2023, 16:50:10 UTC
Bump check-spelling/check-spelling from 0.0.21 to 0.0.22
Tip revision: b8d76f9
test_ansi.rb
# 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_respond_to(@subject, 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
back to top