Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test case doesn't pass in Circle CI #17

Open
oLeVanNghia opened this issue Apr 23, 2018 · 0 comments
Open

Test case doesn't pass in Circle CI #17

oLeVanNghia opened this issue Apr 23, 2018 · 0 comments

Comments

@oLeVanNghia
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant