karafka / wiki

Wiki of the main Karafka repository
https://karafka.io
Other
3 stars 12 forks source link

Documentation error on `karafka-testing` example #25

Closed hbontempo-cw closed 1 year ago

hbontempo-cw commented 1 year ago

First of all: great gen. Love working with karafka.

I think I found an error on a rakafka-testing` example. https://github.com/karafka/wiki/blob/62335a8619b351afa0d520517f825c23875c18c3/Testing.md?plain=1#L126

Apparently Karafka::Routing::Topic has a method #find.

Change suggestion:


-  let(:topic) { group.topics.find { |ts| ts.name == 'xml_data' } } 
+  let(:topic) { group.topics.find('xml_data' ) } 
mensfeld commented 1 year ago

It's not an error as find is also supported because block based is part of the enumerable, though I do agree it could be better.

mensfeld commented 1 year ago

Updated. Thank you.