test/support/fake_sinatra_call.rb in deas-0.22.1 vs test/support/fake_sinatra_call.rb in deas-0.23.0

- old
+ new

@@ -31,14 +31,17 @@ def content_type(*args); args; end def status(*args); args; end def headers(*args); args; end # return the template name for each nested calls - def erb(name, opts, &block) + + RenderArgs = Struct.new(:template_name, :opts, :block_call_result) + + def erb(template_name, opts, &block) if block - [ name, opts, block.call ].flatten + RenderArgs.new(template_name, opts, block.call) else - [ name, opts ] + RenderArgs.new(template_name, opts, nil) end end end