Skip to content

Commit

Permalink
Patch EmptyTemplateHandler#call for Rails 6
Browse files Browse the repository at this point in the history
In Rails 6 the API for template handlers is changing, a template handler
must now take two arguments [1], the template and the source.

I have attempted to retain support for older versions of Rails by
providing a default source of `nil`.

[1] https://www.github.com/rails/rails/commit/28f88e0074
  • Loading branch information
sebjacobs committed Mar 15, 2019
1 parent 5de9280 commit 945cbee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/rails/view_rendering.rb
Expand Up @@ -102,7 +102,7 @@ def find_templates(*args)

# @private
class EmptyTemplateHandler
def self.call(_template)
def self.call(_template, _source = nil)
::Rails.logger.info(" Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.")

%("")
Expand Down

0 comments on commit 945cbee

Please sign in to comment.