Skip to content

Commit 13ed433

Browse files
committed
Kill mutations
1 parent a3c42a1 commit 13ed433

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

rails_event_store/spec/async_handler_helpers_spec.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ module RailsEventStore
1414

1515
around { |example| ActiveJob::Base.with(queue_adapter: :async) { example.run } }
1616

17+
specify "ancestors" do
18+
with_test_handler do |handler|
19+
ancestors = handler.ancestors
20+
handler.prepend AsyncHandler
21+
22+
expect(handler.ancestors - ancestors).to have_attributes(size: 2)
23+
end
24+
25+
with_test_handler do |handler|
26+
ancestors = handler.ancestors
27+
handler.prepend AsyncHandler.with_defaults
28+
29+
expect(handler.ancestors - ancestors).to have_attributes(size: 1)
30+
end
31+
32+
with_test_handler do |handler|
33+
ancestors = handler.ancestors
34+
handler.prepend AsyncHandler.with(event_store_locator: -> { another_event_store })
35+
36+
expect(handler.ancestors - ancestors).to have_attributes(size: 1)
37+
end
38+
end
39+
1740
specify "with defaults" do
1841
with_test_handler do |handler|
1942
handler.prepend RailsEventStore::AsyncHandler

0 commit comments

Comments
 (0)