Skip to content

Commit

Permalink
Fix running tests against Rails 7.1
Browse files Browse the repository at this point in the history
view_paths is no longer mutable
  • Loading branch information
jdelStrother authored and k0kubun committed Dec 9, 2023
1 parent a55cbf6 commit 1098bc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/haml/helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def [](name)
end

def setup
template_path = File.expand_path("../templates", __FILE__)
@base = Class.new(ActionView::Base) do
def nested_tag
content_tag(:span) {content_tag(:div) {"something"}}
Expand All @@ -34,8 +35,7 @@ def wacky_form
def compiled_method_container
self.class
end
end.new(ActionView::LookupContext.new(''), {}, ActionController::Base.new)
@base.view_paths << File.expand_path("../templates", __FILE__)
end.new(ActionView::LookupContext.new(template_path), {}, ActionController::Base.new)
@base.instance_variable_set(:@post, Post.new("Foo bar\nbaz", nil, PostErrors.new))
end

Expand Down

0 comments on commit 1098bc1

Please sign in to comment.