>> require 'rubygems' >> require 'active_support' >> require 'action_view' >> require 'action_controller' >> require 'sprockets/railtie' >> $:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '../../hobo_support/lib') >> $:.unshift File.join(File.expand_path(File.dirname(__FILE__)), '../../dryml/lib') >> require 'hobo_support' >> require 'dryml' >> require 'dryml/railtie/template_handler' {.hidden} >> Dryml.render("hi") => "hi" >> Dryml.render("<%= this %>", {:this => "hello"}) => "hello" >> Dryml.render(%q{HiBye}) => "Hi" >> Dryml.render(%q{<%= this %> }) => "1 2 3 " >> Dryml.render(%q{

Hi}) => "

Hi

" >> Dryml.render(%q{

Hi}).strip => "

Hi

" >> Dryml.render(%q{

img}).strip => "

img

" This triggers bug #452, so disabled. FIXME. #>> Dryml.render(%q{

Hello World}).strip #=> "

Hello World

" Test caching >> template = %q{HiBye} >> t1 = Time.now >> Dryml.render(template, {:x => true}) => "Hi" >> t2 = Time.now >> Dryml.render(template, {:x => false}) => "Bye" >> t3 = Time.now >> (t3-t2)*1.5 < (t2-t1) #=> true Test descendent searching >> doc = REXML::Document.new 'sean' >> Dryml::Template.descendent_select(doc.root) { |el| el.attribute 'a' }.size => 1