Sha256: 326e947791a33b3fb993288159d82a4dcacc39a54353abb83d05047a3e9fe5b5

Contents?: true

Size: 829 Bytes

Versions: 2

Compression:

Stored size: 829 Bytes

Contents

require File.join(File.dirname(__FILE__), 'CONFIG.rb')

require 'test/unit'

require 'nitro/markup'

class TC_Caching < Test::Unit::TestCase # :nodoc: all
  include Nitro

  include Nitro::Markup

  def test_expand
    assert_equal %{&lt;p&gt;Hello World!&lt;/p&gt;}, 
      expand(%{<p>Hello World!</p>})
  end

  def test_expand_redcloth
    assert_equal %{<h1>Hello World!</h1>}, 
      expand_redcloth(%{h1. Hello World!})
  end

  def test_escape
    assert_equal %{Marc_%26_Joe_went_over_the_%27Hill%27_and_shouted_%22Hello_World%21%22}, 
      escape(%{Marc & Joe went over the 'Hill' and shouted "Hello World!"})
  end

  def test_unescape
    assert_equal %{Marc & Joe went over the 'Hill' and shouted "Hello World!"}, 
      unescape(%{Marc_%26_Joe_went_over_the_%27Hill%27_and_shouted_%22Hello_World%21%22})
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.41.0 test/nitro/tc_markup.rb
nitro-0.40.0 test/nitro/tc_markup.rb