Skip to content

Conversation

@keshavbiswa
Copy link

Add RSpec matchers for Rails 8.1+ EventReporter

Introduces matchers for testing ActiveSupport::EventReporter:

  • have_reported_event: Assert an event was reported
  • with_payload: Match event payload
  • with_tags: Match event tags
  • have_reported_no_event: Assert no matching events
  • have_reported_events: Assert multiple events
  • with_debug_event_reporting: Helper to enable debug mode in tests

Related issue: #2876

Add RSpec matchers for Rails 8.1+ EventReporter

Introduces matchers for testing ActiveSupport::EventReporter:
- have_reported_event: Assert an event was reported
- with_payload: Match event payload
- with_tags: Match event tags
- have_reported_no_event: Assert no matching events
- have_reported_events: Assert multiple events
- with_debug_event_reporting: Helper to enable debug mode in tests
@keshavbiswa keshavbiswa changed the title Add RSpec matchers for Rails 8.1+ EventReporter [WIP] Add RSpec matchers for Rails 8.1+ EventReporter Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant