diff --git a/ruby_event_store-active_record/spec/event_repository_spec.rb b/ruby_event_store-active_record/spec/event_repository_spec.rb index f4cb0f5427..b0c032df5e 100644 --- a/ruby_event_store-active_record/spec/event_repository_spec.rb +++ b/ruby_event_store-active_record/spec/event_repository_spec.rb @@ -10,7 +10,6 @@ module ActiveRecord it_behaves_like :event_repository, mk_repository, helper - let(:repository) { mk_repository.call } let(:specification) do Specification.new( @@ -236,9 +235,12 @@ module ActiveRecord ExpectedVersion.any ) - expect { - repository.read(specification.in_batches(3).result).to_a - }.to match_query /SELECT.*FROM.*event_store_events.*WHERE.*event_store_events.id >*.*ORDER BY .*event_store_events.*id.* ASC LIMIT.*/ + ::ActiveRecord::Base.logger = Logger.new(STDOUT) + expect do + expect do + repository.read(specification.in_batches(3).result).to_a + end.to match_query /SELECT.*FROM .event_store_events. ORDER BY .event_store_events.\..id. ASC LIMIT/ + end.to match_query /SELECT.*FROM .event_store_events. WHERE .event_store_events\.id >.* ORDER BY .event_store_events.\..id. ASC LIMIT/ end specify "produces expected query for position in stream call" do