Sha256: 4d30edfce9074e19822dd6e0223e2d43e78bc560520d503793a35465863bb9e2

Contents?: true

Size: 604 Bytes

Versions: 4

Compression:

Stored size: 604 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 N
	
	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

4 entries across 4 versions & 1 rubygems

Version Path
nitro-0.12.0 test/nitro/tc_template.rb
nitro-0.13.0 test/nitro/tc_template.rb
nitro-0.14.0 test/nitro/tc_template.rb
nitro-0.15.0 test/nitro/tc_template.rb