Sha256: 7fa213b5907e5f9ae6f1d2dd84a63a1221ff8559137a8ee35553b9bd839375cf
Contents?: true
Size: 810 Bytes
Versions: 8
Compression:
Stored size: 810 Bytes
Contents
require 'spec/helper' spec_require 'tenjin' class TCTemplateTenjinController < Ramaze::Controller view_root __DIR__/:tenjin engine :Tenjin def index 'Tenjin Index' end def external(num1, num2) @num1 = num1.to_i @num2 = num2.to_i end def internal '<?rb @test = :internal ?>#{@test}' end def escape_html @html = '<br />' '#{@html}${@html}' end end describe "Tenjin templates" do behaves_like 'http' ramaze(:mapping => {'/' => TCTemplateTenjinController}) it "index" do get('/').body.should == 'Tenjin Index' end it "external" do get('/external/1/2').body.should == '3' end it "internal" do get('/internal').body.should == "internal" end it "escape html" do get('/escape_html').body.should == "<br /><br />" end end
Version data entries
8 entries across 8 versions & 4 rubygems