diff --git a/infra/lib/infra/testing.rb b/infra/lib/infra/testing.rb index ee777838..81785e52 100644 --- a/infra/lib/infra/testing.rb +++ b/infra/lib/infra/testing.rb @@ -58,6 +58,13 @@ def assert_changes(actuals, expected) expects = expected.map(&:data) assert_equal(expects, actuals.map(&:data)) end + + def assert_nothing_published_within + before = event_store.read.to_a + yield + after = event_store.read.to_a + assert_equal before, after + end end end