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
{{ message }}
Repository navigation
allow_remote_database_url not working as expected #668
I'm running Rails in development in a Dockerized environment. One of the configured Docker Compose services is a container to run commands (e.g. rails, rake, ...) and its RAILS_ENV is development. If I accidentally run rspec in that particular container, my development database gets cleaned, which is not what I want.
I tried configuring DatabaseCleaner.url_whitelist to include the full URL to the test database. For example:
Activity
tmaier commentedon Feb 1, 2021
Re
DatabaseCleaner.url_allowlist: This should support regex as well. See READMEtakamario commentedon Feb 16, 2021
I tried with rspec by setting
ENV['RAILS_ENV'] ||= 'test'inspec/rails_helper.rb, but77dece1 caused
Rails.env.test?to returnfalse.