Merge pull request #49986 from seanpdoyle/action-view-bug-report-templates

Add `actionview` bug report template
This commit is contained in:
Jean Boussier 2023-12-16 19:33:31 +01:00 committed by GitHub
commit 32afa64e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 0 deletions

@ -0,0 +1,34 @@
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails"
# If you want to test against edge Rails replace the previous line with this:
# gem "rails", github: "rails/rails", branch: "main"
end
require "minitest/autorun"
require "action_view"
class BugTest < ActionView::TestCase
helper do
def upcase(value)
value.upcase
end
end
def test_stuff
render inline: <<~ERB, locals: { key: "value" }
<p><%= upcase(key) %></p>
ERB
element = rendered.html.at("p")
assert_equal element.text, "VALUE"
end
end

@ -42,6 +42,7 @@ Having a way to reproduce your issue will help people confirm, investigate, and
* Template for Active Record (models, database) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record.rb)
* Template for testing Active Record (migration) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_record_migrations.rb)
* Template for Action Pack (controllers, routing) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_controller.rb)
* Template for Action View (views, helpers) issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_view.rb)
* Template for Active Job issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_job.rb)
* Template for Active Storage issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/active_storage.rb)
* Template for Action Mailer issues: [link](https://github.com/rails/rails/blob/main/guides/bug_report_templates/action_mailer.rb)