I write below codes.
database.yml
test: &test
<<: *default
host: 127.0.0.1
database: test_db
test_reader:
<<: *test
host: localhost
TestModel
class TestModel < ActiveRecord::Base
use_switch_point :common
end
require "rails_helper"
RSpec.describe TestModel, :use_transaction do
it "test switch point" do
SwitchPoint.with_readonly do
expect(TestModel.connection.pool.spec.config[:host]).to eq("localhost")
end
end
end
This test case passed in local but failed in Circle CI.
Can anyone help me?
I write below codes.
database.yml
TestModel
This test case passed in local but failed in Circle CI.
Can anyone help me?