I inherited a Rails project where the (SQLite) Dev and Test databases are the same, as in the database.yml file.
Are there any advantages to this? Why would anyone do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The test database will get overwritten by the tests normally (unless you use transactional fixtures). If test and development databases are the same, your data will be erased every time you run your test suite. Development data may interfere with the test suite and make it unrealiable.
I would cleary consider this a design mistake. There is no reason, you should ever do this. Even the
database.ymlin a freshly created rails app states: