Sha256: 2fa79108215a96f0340e4c9abd381c6a8b8bb42240dc3ef73e45f978c6c847f8

Contents?: true

Size: 582 Bytes

Versions: 15

Compression:

Stored size: 582 Bytes

Contents

# encoding: utf-8

class Nanoc::Filters::TypogrubyTest < MiniTest::Unit::TestCase

  include Nanoc::TestHelpers

  def test_filter
    if_have 'typogruby' do
      # Get filter
      filter = ::Nanoc::Filters::Typogruby.new

      # Run filter
      a = '"Typogruby makes HTML look smarter &amp; better, don\'t you think?"'
      b = '<span class="dquo">&#8220;</span>Typogruby makes <span class="caps">HTML</span> look smarter <span class="amp">&amp;</span> better, don&#8217;t you&nbsp;think?&#8221;'
      result = filter.run(a)
      assert_equal(b, result)
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.5.0 test/filters/test_typogruby.rb
nanoc-3.5.0b2 test/filters/test_typogruby.rb
nanoc-3.5.0b1 test/filters/test_typogruby.rb
nanoc-3.4.3 test/filters/test_typogruby.rb
nanoc-3.4.2 test/filters/test_typogruby.rb
nanoc-3.4.1 test/filters/test_typogruby.rb
nanoc-3.4.0 test/filters/test_typogruby.rb
nanoc-3.3.7 test/filters/test_typogruby.rb
nanoc-3.3.6 test/filters/test_typogruby.rb
nanoc-3.3.5 test/filters/test_typogruby.rb
nanoc-3.3.4 test/filters/test_typogruby.rb
nanoc-3.3.3 test/filters/test_typogruby.rb
nanoc-3.3.2 test/filters/test_typogruby.rb
nanoc-3.3.1 test/filters/test_typogruby.rb
nanoc-3.3.0 test/filters/test_typogruby.rb