Sha256: 0a373b629760faec8786e38e28d0e3baafb5837c358ce9c83af8596b7f9f5fc5

Contents?: true

Size: 649 Bytes

Versions: 2

Compression:

Stored size: 649 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')

require 'test/unit'
require 'ostruct'

require 'nitro/template'

class TC_Template < Test::Unit::TestCase # :nodoc: all
  include Nitro
  
  def test_all
    template = %q{
      Hello #{user}

      dont forget the following todo items:
      
      <?r for item in items ?>
        <li>#{item}</li>
      <?r end ?>
    }

    user = 'gmosx'
    items = %w{ nitro is really great }
    out = ''

    Template.process(template, :out, binding)

    assert_match %r{\<li\>nitro\</li\>}, out
    assert_match %r{\<li\>really\</li\>}, out
    assert_match %r{Hello gmosx}, out
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.21.0 test/nitro/tc_template.rb
nitro-0.21.2 test/nitro/tc_template.rb