Created
February 28, 2019 23:49
-
-
Save palkan/68be286cdff1f01e58738e5df2c4083a to your computer and use it in GitHub Desktop.
rspec-rails vs. Rails 6.0.0.beta2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# PR: https://github.com/rspec/rspec-rails/pull/2095 | |
RSpec::Rails::ViewRendering::EmptyTemplateHandler.singleton_class.prepend(Module.new do | |
def call(template, _source) | |
super(template) | |
end | |
end) | |
# Issue: https://github.com/rspec/rspec-rails/issues/2094 | |
RSpec::Rails::ViewRendering::EmptyTemplateResolver.singleton_class.prepend(Module.new do | |
def nullify_template_rendering(templates) | |
templates.map do |template| | |
::ActionView::Template.new( | |
"", | |
template.identifier, | |
RSpec::Rails::ViewRendering::EmptyTemplateHandler, | |
virtual_path: template.virtual_path, | |
format: template.format | |
) | |
end | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment