Sha256: 91fd2772b0fb66388a23848ec30e5d646f303bef8d76850dd038dc2a2e872113

Contents?: true

Size: 701 Bytes

Versions: 12

Compression:

Stored size: 701 Bytes

Contents

require 'test/unit'
require 'helper'
require 'webgen/contentprocessor'

class TestContentProcessor < Test::Unit::TestCase

  include Test::WebsiteHelper

  def setup
    super
    @website.config.data['contentprocessor.map'] = {'test' => Hash}
  end

  def test_access_hash
    ah = Webgen::ContentProcessor::AccessHash.new
    assert(ah.has_key?('test'))
    assert(!ah.has_key?('other'))
    assert_kind_of(Hash, ah['test'])
    assert_nil(ah['other'])
  end

  def test_list
    assert_equal(['test'], Webgen::ContentProcessor.list)
  end

  def test_for_name
    assert_kind_of(Hash, Webgen::ContentProcessor.for_name('test'))
    assert_nil(Webgen::ContentProcessor.for_name('other'))
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

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