require 'rubygems' require 'bundler/setup' require 'simple_view' require 'simple_view/builder_view' include SimpleView include SimpleView::Renderable Base.directory_views = File.join(File.dirname(__FILE__), 'views') Base.directory_helpers = File.join(File.dirname(__FILE__), 'helpers') # render 'test-erb', :locals => {:who => 'You'}, :target => $stdout puts "BUILDER", render_builder('test', :locals => {:who => 'tata'}) render_builder('test', :locals => {:who => 'tata'}) puts "ERB 0", render('test', :locals => {:who => 'tata'}) puts "ERB 1", render_erb('test', :locals => {:who => 'toto'}) puts "ERB 2", render_erb('test', :locals => {:who => 'titi'})