palkan / active_event_store

Rails Event Store in a more Rails way
MIT License
182 stars 13 forks source link

have_published_event matcher. #14

Closed andrasio closed 1 year ago

andrasio commented 1 year ago

Hi all,

I'm curious why the have_published_event matcher only supports block expectations as stated in the readme. I'm curious to know the reason why we wouldn't be able to do expect(...).to have_published_event(SomeEventClass)

Thank you!

palkan commented 1 year ago

Hey!

Enforcing block expectations prevent from potential flakiness caused by shared state (or setup code which may also trigger events).