diff --git a/test/connection_switching_test.rb b/test/connection_switching_test.rb index ee8f1e19..7459b297 100644 --- a/test/connection_switching_test.rb +++ b/test/connection_switching_test.rb @@ -497,6 +497,8 @@ class UnshardedModel < ActiveRecord::Base refute t.comments.empty? assert_equal 'slave comment', t.comments.first.body end + Ticket.on_slave_by_default = false + Comment.on_slave_by_default = false end it "sets up has and belongs to many sharded-ness correctly when sharded" do