From 90082f39d524e5bcf454835f00cbab0f98824bd5 Mon Sep 17 00:00:00 2001 From: Ryan Kerr Date: Fri, 6 Sep 2024 05:28:28 -0400 Subject: [PATCH] Allow adapter to receive :execute with other statements, too. --- spec/cluster/migration_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/cluster/migration_spec.rb b/spec/cluster/migration_spec.rb index 09edf193..c1c72b6d 100644 --- a/spec/cluster/migration_spec.rb +++ b/spec/cluster/migration_spec.rb @@ -129,6 +129,8 @@ it 'creates a table' do + allow_any_instance_of(ActiveRecord::ConnectionAdapters::ClickhouseAdapter).to receive(:execute).and_call_original + expect_any_instance_of(ActiveRecord::ConnectionAdapters::ClickhouseAdapter).to receive(:execute) .with('ALTER TABLE some ON CLUSTER ' + connection_config[:cluster_name] + ' DROP INDEX idx') .and_call_original