Sha256: 51f1bae5cd28f701304270856b6bb7f03b98eb2bb15c2ed7247d9becb0e5e5e9

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'webgen/test_helper'
require 'webgen/path_handler/template'
require 'webgen/path'
require 'webgen/cache'

class TestPathHandlerTemplate < MiniTest::Unit::TestCase

  include Webgen::TestHelper

  def test_create_nodes
    setup_website
    root = Webgen::Node.new(@website.tree.dummy_root, '/', '/')
    @template = Webgen::PathHandler::Template.new(@website)

    path = Webgen::Path.new('/default.template', 'dest_path' => '<parent><basename><ext>') { StringIO.new('test') }
    node = @template.create_nodes(path, ['content'])
    refute_nil(node)
    assert_equal(['content'], node.blocks)
    assert(node['no_output'])
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webgen-1.0.0.beta3 test/webgen/path_handler/test_template.rb
webgen-1.0.0.beta2 test/webgen/path_handler/test_template.rb