Sha256: eeecb2b43c6ea88d53b2322b98b4cfc00a4c638682dd730bf30d4c28bab9884b

Contents?: true

Size: 608 Bytes

Versions: 6

Compression:

Stored size: 608 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

6 entries across 6 versions & 1 rubygems

Version Path
nitro-0.16.0 test/nitro/tc_template.rb
nitro-0.17.0 test/nitro/tc_template.rb
nitro-0.18.0 test/nitro/tc_template.rb
nitro-0.18.1 test/nitro/tc_template.rb
nitro-0.19.0 test/nitro/tc_template.rb
nitro-0.20.0 test/nitro/tc_template.rb