Sha256: 7bed937ed1f9ae097ebd8faea3b40b1dcfb4eec1fa96fe656680d4d57d326670

Contents?: true

Size: 653 Bytes

Versions: 9

Compression:

Stored size: 653 Bytes

Contents

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

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

class TestPathHandlerTemplate < Minitest::Test

  include Webgen::TestHelper

  def test_create_nodes
    setup_website
    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

9 entries across 9 versions & 1 rubygems

Version Path
webgen-1.7.3 test/webgen/path_handler/test_template.rb
webgen-1.7.2 test/webgen/path_handler/test_template.rb
webgen-1.7.1 test/webgen/path_handler/test_template.rb
webgen-1.7.0 test/webgen/path_handler/test_template.rb
webgen-1.6.0 test/webgen/path_handler/test_template.rb
webgen-1.5.2 test/webgen/path_handler/test_template.rb
webgen-1.5.1 test/webgen/path_handler/test_template.rb
webgen-1.5.0 test/webgen/path_handler/test_template.rb
webgen-1.4.1 test/webgen/path_handler/test_template.rb