Permalink
Browse files

Breaks out the empty template handler to a strongly named class

  • Loading branch information...
1 parent 22d3731 commit 52493649d70754377b5e41be1c385a742f268bd7 @alindeman alindeman committed Dec 11, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/rspec/rails/view_rendering.rb
@@ -73,7 +73,7 @@ def find_all(*args)
::ActionView::Template.new(
"",
template.identifier,
- lambda { |template| %[ "" ] },
+ EmptyTemplateHandler,
{
:virtual_path => template.virtual_path,
:format => template.formats
@@ -83,6 +83,12 @@ def find_all(*args)
end
end
+ class EmptyTemplateHandler
+ def self.call(template)
+ %("")
+ end
+ end
+
module EmptyTemplates
# @api private
def prepend_view_path(new_path)

0 comments on commit 5249364

Please sign in to comment.