Sha256: 8c3a677e8a1c9b07326ee63533094d10f55d862eef3ee8e31e6d97b50986f34c
Contents?: true
Size: 1.36 KB
Versions: 7
Compression:
Stored size: 1.36 KB
Contents
require File.dirname(__FILE__) + '/helper' class TestFilters < Test::Unit::TestCase class JekyllFilter include Jekyll::Filters end def setup @filter = JekyllFilter.new end def test_textilize_with_simple_string assert_equal "<p>something <strong>really</strong> simple</p>", @filter.textilize("something *really* simple") end def test_array_to_sentence_string_with_no_args assert_equal "", @filter.array_to_sentence_string([]) end def test_array_to_sentence_string_with_one_arg assert_equal "1", @filter.array_to_sentence_string([1]) assert_equal "chunky", @filter.array_to_sentence_string(["chunky"]) end def test_array_to_sentence_string_with_two_args assert_equal "1 and 2", @filter.array_to_sentence_string([1, 2]) assert_equal "chunky and bacon", @filter.array_to_sentence_string(["chunky", "bacon"]) end def test_array_to_sentence_string_with_multiple_args assert_equal "1, 2, 3, and 4", @filter.array_to_sentence_string([1, 2, 3, 4]) assert_equal "chunky, bacon, bits, and pieces", @filter.array_to_sentence_string(["chunky", "bacon", "bits", "pieces"]) end def test_xml_escape_with_ampersands assert_equal "AT&T", @filter.xml_escape("AT&T") assert_equal "<code>command &lt;filename&gt;</code>", @filter.xml_escape("<code>command <filename></code>") end end
Version data entries
7 entries across 7 versions & 4 rubygems