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

Version Path
radiantcms-couchrest_model-0.2.4 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.2.2 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.2.1 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.2 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.1.9 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.1.8 vendor/radius/test/test_helper.rb
radiantcms-couchrest_model-0.1.7 vendor/radius/test/test_helper.rb
radius19-radiant-1.0.0 test/test_helper.rb