Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for Rails 6 #2100

Merged
merged 1 commit into from Mar 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/rspec/rails/view_rendering.rb
Expand Up @@ -56,11 +56,21 @@ def self.nullify_template_rendering(templates)
template.identifier,
EmptyTemplateHandler,
:virtual_path => template.virtual_path,
:format => template.formats
:format => template_format(template)
)
end
end

if ::Rails::VERSION::STRING >= '6'
def self.template_format(template)
template.format
end
else
def self.template_format(template)
template.formats
end
end

# Delegates all methods to the submitted resolver and for all methods
# that return a collection of `ActionView::Template` instances, return
# templates with modified source
Expand Down