/
githubmirror
/
jekyll
Обзор
Документация
Войти
/
githubmirror
/
jekyll
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/test_ansi.rb
25 строк
554 B
Frank Taillandier
style: enable new cops (#8538)
13 янв 2021, 02:39
Не верифицирован
13 янв 2021, 02:39
8c8326e
Код
Авторство
О чём код?
# 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