test/support/view_handlers.rb in deas-0.29.0 vs test/support/view_handlers.rb in deas-0.30.0

- old
+ new

@@ -1,5 +1,6 @@ +require 'deas/template_source' require 'deas/view_handler' class EmptyViewHandler include Deas::ViewHandler @@ -36,18 +37,36 @@ class RenderViewHandler include Deas::ViewHandler def run! - render "my_template", :some => :option + render "my_template", :some => 'local' end end +class SourceRenderViewHandler + include Deas::ViewHandler + + def run! + source = Deas::TemplateSource.new(Factory.path) + source_render source, "my_template", :some => 'local' + end +end + class PartialViewHandler include Deas::ViewHandler def run! - partial "my_partial", :some => 'locals' + partial "my_partial", :some => 'local' + end +end + +class SourcePartialViewHandler + include Deas::ViewHandler + + def run! + source = Deas::TemplateSource.new(Factory.path) + source_partial source, "my_partial", :some => 'local' end end class SendFileViewHandler include Deas::ViewHandler