Sha256: cdf61c925e9449e73bafc5a5c6feed853e6f26f73941dbeee09fa9e3229cd0e7

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

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

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

class TestContentProcessorRuby < Minitest::Test

  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

6 entries across 6 versions & 1 rubygems

Version Path
webgen-1.7.0 test/webgen/content_processor/test_ruby.rb
webgen-1.6.0 test/webgen/content_processor/test_ruby.rb
webgen-1.5.2 test/webgen/content_processor/test_ruby.rb
webgen-1.5.1 test/webgen/content_processor/test_ruby.rb
webgen-1.5.0 test/webgen/content_processor/test_ruby.rb
webgen-1.4.1 test/webgen/content_processor/test_ruby.rb