diff --git a/ruby_event_store/lib/ruby_event_store/in_memory_repository.rb b/ruby_event_store/lib/ruby_event_store/in_memory_repository.rb index 45ee6fef75..681c3829f5 100644 --- a/ruby_event_store/lib/ruby_event_store/in_memory_repository.rb +++ b/ruby_event_store/lib/ruby_event_store/in_memory_repository.rb @@ -129,7 +129,6 @@ def streams_of(event_id) def search_streams(stream_name) streams .select { |name,| name.downcase.include?(stream_name.downcase) } - .to_a .take(10) .reverse .map { |name,| Stream.new(name) } diff --git a/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb b/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb index 25e4e5a9ba..1cd112594b 100644 --- a/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb +++ b/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb @@ -1202,6 +1202,15 @@ def read_events_backward(repository, stream = nil, from: nil, to: nil, count: ni expect(repository.search_streams("Stream C")).to eq [stream_c] end + specify do + 11.times do |index| + stream = Stream.new("Stream #{index}") + repository.append_to_stream([ SRecord.new(event_id: SecureRandom.uuid)], stream, version_any) + end + + expect(repository.search_streams("stream").size).to eq 10 + end + specify do e1 = SRecord.new(event_id: "8a6f053e-3ce2-4c82-a55b-4d02c66ae6ea") e2 = SRecord.new(event_id: "8cee1139-4f96-483a-a175-2b947283c3c7")