Sha256: d23a7627373748724121c3d5fd06629497766c809ec2ef16dc79f6178ed6b168
Contents?: true
Size: 863 Bytes
Versions: 8
Compression:
Stored size: 863 Bytes
Contents
require 'webgen/test' require 'webgen/node' class BlockTagTest < Webgen::TagTestCase plugin_files [ 'webgen/plugins/tags/block.rb', 'webgen/plugins/filehandlers/directory.rb', 'webgen/plugins/filehandlers/page.rb', ] plugin_to_test 'Tag/Block' def test_process_tag root = @manager['Core/FileHandler'].instance_eval { build_tree } page_node = root.resolve_node('index.en.page') assert_equal( ["5 * 3 = 15", [page_node]], @plugin.process_tag( 'block', [page_node] ) ) assert_equal( ["5 * 3 = 15", [page_node]], @plugin.process_tag( 'block', [page_node, page_node] ) ) page_node['useERB'] = false assert_equal( ["5 * 3 = <%= 5*3 %>", [page_node]], @plugin.process_tag( 'block', [page_node] ) ) set_config( 'blockName' => 'unknown' ) assert_equal( '', @plugin.process_tag( 'block', [page_node] ) ) end end
Version data entries
8 entries across 8 versions & 1 rubygems