spec/plugin/render_spec.rb in roda-cj-0.9.5 vs spec/plugin/render_spec.rb in roda-cj-0.9.6

- old
+ new

@@ -26,18 +26,23 @@ end r.on "path" do render(:path=>"./spec/views/about.erb", :locals=>{:title => "Path"}, :layout_opts=>{:locals=>{:title=>"Home"}}) end + + r.on "content" do + view(:content=>'bar', :layout_opts=>{:locals=>{:title=>"Home"}}) + end end end end it "default actions" do body("/about").strip.should == "<h1>About Roda</h1>" body("/home").strip.should == "<title>Roda: Home</title>\n<h1>Home</h1>\n<p>Hello Agent Smith</p>" body("/inline").strip.should == "Hello Agent Smith" body("/path").strip.should == "<h1>Path</h1>" + body("/content").strip.should == "<title>Roda: Home</title>\nbar" end it "with str as engine" do app.render_opts[:engine] = "str" body("/about").strip.should == "<h1>About Roda</h1>"