spec/plugin/padrino_render_spec.rb in roda-2.1.0 vs spec/plugin/padrino_render_spec.rb in roda-2.2.0

- old
+ new

@@ -9,42 +9,19 @@ before do app(:bare) do plugin :padrino_render, :views=>"./spec/views" route do |r| - r.is "partial" do - partial("test", :locals=>{:title => "About Roda"}) - end - - r.is "partial/subdir" do - partial("about/test", :locals=>{:title => "About Roda"}) - end - - r.is "partial/inline" do - partial(:inline=>"Hello <%= name %>", :locals=>{:name => "Agent Smith"}) - end - + r.is "render" do render(:content=>'bar', :layout_opts=>{:locals=>{:title=>"Home"}}) end r.is "render/nolayout" do render("about", :locals=>{:title => "No Layout"}, :layout=>nil) end end end - end - - it "partial renders without layout, and prepends _ to template" do - body("/partial").strip.should == "<h1>About Roda</h1>" - end - - it "partial renders without layout, and prepends _ to template" do - body("/partial/subdir").strip.should == "<h1>Subdir: About Roda</h1>" - end - - it "partial handles inline partials" do - body("/partial/inline").strip.should == "Hello Agent Smith" end it "render uses layout by default" do body("/render").strip.should == "<title>Roda: Home</title>\nbar" end