You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A minimal example that can reproduce the issue is below. For the sake of example, assume there is some really boring model called Account which can be created with just an email address.
In the below minimal RSpec test...
Both examples FAIL when run through Spring. The failure is ActiveRecord::ReadOnlyError due to Account.create!
Both examples PASS when not run through Spring.
RSpec.describe'something'dolet!(:stuff){Account.create!(email: '[email protected]')}it'should do things'doActiveRecord::Base.connected_to(role: :reading)doexpect(Account.count).toeq(1)endendit'should do other things'doexpect(Account.count).toeq(1)endend
Using the new built-in multiple database support seems to be incompatible with Spring.
A minimal example that can reproduce the issue is below. For the sake of example, assume there is some really boring model called
Account
which can be created with just an email address.In the below minimal RSpec test...
ActiveRecord::ReadOnlyError
due toAccount.create!
The relevant part of
ApplicationRecord
Our hypothetical
Account
is just an empty class.And the relevant section of
database.yml
, which is about as default as it comes.The text was updated successfully, but these errors were encountered: