Skip to content

Commit b1d04fb

Browse files
committed
One more to fix
1 parent a15832b commit b1d04fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/flipper/adapters/active_record_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240

241241
after do
242242
# Disconnect role-based connections to avoid interfering with database cleanup
243-
ActiveRecord::Base.connection_handler.clear_all_connections!
243+
clear_all_connections!
244244
end
245245

246246
let(:feature_class) do
@@ -373,4 +373,9 @@ def clear_active_connections!
373373
method = ActiveRecord::Base.connection_handler.method(:clear_active_connections!)
374374
method.arity == 0 ? method.call : method.call(:all)
375375
end
376+
377+
def clear_all_connections!
378+
method = ActiveRecord::Base.connection_handler.method(:clear_all_connections!)
379+
method.arity == 0 ? method.call : method.call(:all)
380+
end
376381
end

0 commit comments

Comments
 (0)