Namespace
Methods
Constants
| Report | = | Struct.new(:error, :handled, :severity, :context, :source, keyword_init: true) |
Class Public methods
record() Link
Source: show
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 16 def record subscribe recorders = ActiveSupport::IsolatedExecutionState[:active_support_error_reporter_assertions] ||= [] reports = [] recorders << reports begin yield reports ensure recorders.delete_if { |r| reports.equal?(r) } end end
report(error, **kwargs) Link
Source: show
# File activesupport/lib/active_support/testing/error_reporter_assertions.rb, line 29 def report(error, **kwargs) report = Report.new(error: error, **kwargs) ActiveSupport::IsolatedExecutionState[:active_support_error_reporter_assertions]&.each do |reports| reports << report end true end