mirror of https://github.com/rails/rails
Merge pull request #44529 from Shopify/actionview-fix-flaky-tests
Fix flaky Action View tests
This commit is contained in:
commit
b64cbc0b27
|
@ -30,6 +30,8 @@ class ViewLoadPathsTest < ActionController::TestCase
|
|||
end
|
||||
|
||||
def setup
|
||||
ActionView::LookupContext::DetailsKey.clear
|
||||
|
||||
@controller = TestController.new
|
||||
@request = ActionController::TestRequest.create(@controller.class)
|
||||
@response = ActionDispatch::TestResponse.new
|
||||
|
|
|
@ -52,6 +52,11 @@ class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase
|
|||
tests RenderPartialWithRecordIdentificationController
|
||||
fixtures :developers, :projects, :developers_projects, :topics, :replies, :companies, :mascots
|
||||
|
||||
def setup
|
||||
super
|
||||
ActionView::LookupContext::DetailsKey.clear
|
||||
end
|
||||
|
||||
def test_rendering_partial_with_has_many_and_belongs_to_association
|
||||
get :render_with_has_many_and_belongs_to_association
|
||||
assert_equal Developer.find(1).projects.map(&:name).join, @response.body
|
||||
|
|
|
@ -712,6 +712,8 @@ class FrozenStringLiteralEnabledViewRenderTest < ActiveSupport::TestCase
|
|||
include RenderTestCases
|
||||
|
||||
def setup
|
||||
ActionView::LookupContext::DetailsKey.clear
|
||||
|
||||
@previous_frozen_literal = ActionView::Template.frozen_string_literal
|
||||
ActionView::Template.frozen_string_literal = true
|
||||
view_paths = ActionController::Base.view_paths
|
||||
|
|
Loading…
Reference in New Issue