Merge pull request #49986 from seanpdoyle/action-view-bug-report-templates
Add `actionview` bug report template
This commit is contained in:
commit
32afa64e17
34
guides/bug_report_templates/action_view.rb
Normal file
34
guides/bug_report_templates/action_view.rb
Normal file
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user