Sha256: 510071e1d9b7c3b90b95453e015102fb0c7e6c59e1885158bbaea841d6811485

Contents?: true

Size: 607 Bytes

Versions: 3

Compression:

Stored size: 607 Bytes

Contents

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

require 'webgen/test_helper'
require 'webgen/content_processor/ruby'

class TestBuilder < MiniTest::Unit::TestCase

  include Webgen::TestHelper

  def test_static_call
    setup_context
    cp = Webgen::ContentProcessor::Ruby

    @context.content = "context.content = context.dest_node.alcn"
    assert_equal(@context.dest_node.alcn, cp.call(@context).content)

    @context.content = "5+5\n+=+6\n"
    assert_error_on_line(SyntaxError, 2) { cp.call(@context) }

    @context.content = "5+5\nunknown\n++6"
    assert_error_on_line(NameError, 2) { cp.call(@context) }
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
webgen-1.0.0.beta3 test/webgen/content_processor/test_ruby.rb
webgen-1.0.0.beta2 test/webgen/content_processor/test_ruby.rb
webgen-1.0.0.beta1 test/webgen/content_processor/test_ruby.rb