diff --git a/spec/active_record/connection_adapters/makara_mysql2_adapter_spec.rb b/spec/active_record/connection_adapters/makara_mysql2_adapter_spec.rb index 0c11b76c..d8daa164 100644 --- a/spec/active_record/connection_adapters/makara_mysql2_adapter_spec.rb +++ b/spec/active_record/connection_adapters/makara_mysql2_adapter_spec.rb @@ -157,9 +157,7 @@ con = connection.slave_pool.connections.first expect(con).to receive(:exec_query) do |query| expect(query).to match(/SELECT\s+1\s*(AS one)?\s+FROM .?users.?\s+LIMIT\s+.?1/) - end.once. - # and_call_original # Switch back to this once https://github.com/rspec/rspec-mocks/pull/1385 is released - and_wrap_original { |m, *args| m.call(*args.first(3)) } + end.once.and_call_original Test::User.exists? end diff --git a/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb b/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb index 897f5b88..e4b7f67d 100644 --- a/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb +++ b/spec/active_record/connection_adapters/makara_postgresql_adapter_spec.rb @@ -73,9 +73,7 @@ expect(con).to receive(:exec_query) do |query| expect(query).to match(/SELECT\s+1\s*(AS one)?\s+FROM .?users.?\s+LIMIT\s+.?1/) - end.once. - # and_call_original # Switch back to this once https://github.com/rspec/rspec-mocks/pull/1385 is released - and_wrap_original { |m, *args| m.call(*args.first(3)) } + end.once.and_call_original Test::User.exists? end