なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2025/03/25)

2025/03/25分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activesupport/CHANGELOG.md


Merge pull request #54798 from Edouard-chin/ec-actiontext-rollup

actiontext/package.jsonの修正です。

不足していた、rollup-plugin-terserをdev dependencyに追加しています。


Introduce ActiveSupport::Testing::ErrorReporterAssertions#capture_error_reports

activesupport/lib/active_support/testing/error_reporter_assertions.rbの修正です。

block内から指定されたエラークラスにマッチしたエラーだけをreportするActiveSupport::Testing::ErrorReporterAssertions#capture_error_reportsを追加しています。

reports = capture_error_reports(IOError) do
  Rails.error.report(IOError.new("Oops"))   # reportする
  Rails.error.report(IOError.new("Oh no"))  # reportする
  Rails.error.report(StandardError.new)     # reportしない
end