Sha256: ed99ae24784f4cea59625c07d6138673fb491e3bc16a28787dc3b4ea94feb6c3

Contents?: true

Size: 665 Bytes

Versions: 3

Compression:

Stored size: 665 Bytes

Contents

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

require 'test/unit'

require 'nitro/element'

include Nitro

$source = %{
<html>
	<?r a = 5 ?>
	Here is some text
	<body style="hidden" name="1">
		Some more
		<Box color="#f00">
			Hello World
			<Box color="#ff0">
				<b>nice</b>
				<i>stuff</i>
				<Box color="#fff">
					It works
				</Box>
			</Box>
			Text
		</Box>
		The End
	</body>
</html>
}

class Box < Nitro::Element
	def open
		%|<div style="color: #@color">|
	end
	
	def close
		"</div>"
	end
end

class TC_Element < Test::Unit::TestCase # :nodoc: all
	def test_all
		res = ElementProcessor.render($source)
		puts '---', res
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nitro-0.17.0 test/nitro/tc_element.rb
nitro-0.18.0 test/nitro/tc_element.rb
nitro-0.18.1 test/nitro/tc_element.rb