Skip to content

Commit 17a5ae1

Browse files
authored
Merge pull request rails#53830 from p8/guides/bug-template-with-fw-defaults
Set `framework_defaults` in Active Job and Action Mailer bug report t…
2 parents 91d4563 + 723d5fd commit 17a5ae1

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

guides/bug_report_templates/action_mailer.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313
require "action_mailer/railtie"
1414
require "minitest/autorun"
1515

16+
class TestApp < Rails::Application
17+
config.load_defaults Rails::VERSION::STRING.to_f
18+
config.root = __dir__
19+
config.eager_load = false
20+
config.hosts << "example.org"
21+
config.secret_key_base = "secret_key_base"
22+
23+
config.logger = Logger.new($stdout)
24+
end
25+
Rails.application.initialize!
26+
1627
class TestMailer < ActionMailer::Base
1728
def hello_world
1829
@message = "Hello, world"

guides/bug_report_templates/active_job.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@
1010
# gem "rails", github: "rails/rails", branch: "main"
1111
end
1212

13-
require "active_job"
13+
require "active_job/railtie"
1414
require "minitest/autorun"
1515

16+
class TestApp < Rails::Application
17+
config.load_defaults Rails::VERSION::STRING.to_f
18+
config.eager_load = false
19+
config.secret_key_base = "secret_key_base"
20+
21+
config.logger = Logger.new($stdout)
22+
end
23+
Rails.application.initialize!
24+
1625
class BuggyJob < ActiveJob::Base
1726
def perform
1827
puts "performed"

0 commit comments

Comments
 (0)