Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/event_engine/processing_rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def for(event_name:, pack:)
end

def any?
!@default.nil? || @packs.any? || @events.any?
processor_names.any?
end

def processor_names
Expand Down
4 changes: 4 additions & 0 deletions test/lib/event_engine/processing_rules_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def rules_file(contents)
refute_predicate ProcessingRules.new, :any?
end

test "reports no rules when every event is listed but undecided" do
refute_predicate ProcessingRules.new(events: { cow_fed: nil, barn_built: nil }), :any?
end

test "loads the rules from a yaml file" do
path = rules_file(<<~YAML)
default: inline
Expand Down
Loading