Sha256: f8125e1063787b11b30c62eff19a8db93e8d1551a1e063aef66b150dff179766

Contents?: true

Size: 768 Bytes

Versions: 11

Compression:

Stored size: 768 Bytes

Contents

require 'test/unit'
require 'helper'
require 'webgen/tag'

class TestTagCoderay < Test::Unit::TestCase

  include Test::WebsiteHelper

  def setup
    super
    @obj = Webgen::Tag::Coderay.new
  end

  def call(context, body, lang, process)
    @obj.set_params({'tag.coderay.lang' => lang,
                      'tag.coderay.process' => process})
    result = @obj.call('coderay', body, context)
    @obj.set_params({})
    result
  end

  def test_call
    root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/', {'title' => 'Hallo'})
    context = Webgen::ContentProcessor::Context.new(:chain => [root])

    assert(call(context, 'TestData', 'html', false).include?('TestData'))
    assert(call(context, '{title:}', :ruby, true).include?('Hallo'))
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
gettalong-webgen-0.5.4.20080929 test/test_tag_coderay.rb
gettalong-webgen-0.5.5.20081001 test/test_tag_coderay.rb
gettalong-webgen-0.5.5.20081010 test/test_tag_coderay.rb
gettalong-webgen-0.5.5.20081012 test/test_tag_coderay.rb
gettalong-webgen-0.5.6.20081020 test/test_tag_coderay.rb
webgen-0.5.1 test/test_tag_coderay.rb
webgen-0.5.2 test/test_tag_coderay.rb
webgen-0.5.3 test/test_tag_coderay.rb
webgen-0.5.4 test/test_tag_coderay.rb
webgen-0.5.6 test/test_tag_coderay.rb
webgen-0.5.5 test/test_tag_coderay.rb