Sha256: 3eaf9caabf229e7089bebf8a2ab27fafb36e2566fe70c7ef7f1c26b019593eb7
Contents?: true
Size: 811 Bytes
Versions: 10
Compression:
Stored size: 811 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
10 entries across 10 versions & 4 rubygems