Sha256: 35441f4f6b06413316592bba11298c6303b7ac567f09a4cb1cc38b878b64e9b2
Contents?: true
Size: 668 Bytes
Versions: 8
Compression:
Stored size: 668 Bytes
Contents
require 'rubygems' require 'test/unit' require File.dirname(__FILE__) + '/../lib/radius19' class Test::Unit::TestCase end module RadiusTestHelper class TestContext < Radius::Context; end def new_context Radius::Context.new do |c| c.define_tag("reverse" ) { |tag| tag.expand.reverse } c.define_tag("capitalize") { |tag| tag.expand.upcase } c.define_tag("attr" ) { |tag| tag.attr.inspect } c.define_tag("echo" ) { |tag| tag.attr['value'] } c.define_tag("wrap" ) { |tag| "[#{tag.expand}]" } end end def define_tag(name, options = {}, &block) @context.define_tag name, options, &block end end
Version data entries
8 entries across 8 versions & 2 rubygems