Sha256: da4c1f0b49c8d6bdf1dab7a42208051db9702ed70d78b67752dbd62625037e94
Contents?: true
Size: 799 Bytes
Versions: 3
Compression:
Stored size: 799 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/test_helper' class TestBuilder < Minitest::Test include Webgen::TestHelper def test_static_call require 'webgen/content_processor/builder' rescue skip('Library builder not installed') setup_context cp = Webgen::ContentProcessor::Builder @context.content = "xml.div(:path => context.node.alcn) { xml.strong('test'); " + "context.website; context.ref_node; context.dest_node }" assert_equal("<div path=\"/test\">\n <strong>test</strong>\n</div>\n", cp.call(@context).content) @context.content = "xml.div do \n=+6\nend" assert_error_on_line(SyntaxError, 2) { cp.call(@context) } @context.content = "xml.div do \nx=5+5\nunknown\n+6\nend" assert_error_on_line(NameError, 3) { cp.call(@context) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
webgen-1.7.3 | test/webgen/content_processor/test_builder.rb |
webgen-1.7.2 | test/webgen/content_processor/test_builder.rb |
webgen-1.7.1 | test/webgen/content_processor/test_builder.rb |