Sha256: e51ed77a15675d80a90add14b859b6805b453d0e7275e76b8faba90f18268c29
Contents?: true
Size: 678 Bytes
Versions: 2
Compression:
Stored size: 678 Bytes
Contents
# -*- encoding: utf-8 -*- require 'test/unit' require 'webgen/tree' require 'webgen/contentprocessor' class TestContentProcessorErb < Test::Unit::TestCase def test_call obj = Webgen::ContentProcessor::Erb.new root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/') node = Webgen::Node.new(root, 'test', 'test') context = Webgen::ContentProcessor::Context.new(:content => '<%= context[:doit] %>6', :doit => 'hallo', :chain => [node]) obj.call(context) assert_equal('hallo6', context.content) context.content = '<%= 5* %>' assert_raise(RuntimeError) { obj.call(context) } end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
gettalong-webgen-0.5.7.20090227 | test/test_contentprocessor_erb.rb |
webgen-0.5.7 | test/test_contentprocessor_erb.rb |