Add activerecord/db/ to gitignore
After running `bundle exec rake test:sqlite3` and `bundle exec rake test:sqlite3_mem` on my VM I noticed that it had created untracked files: ```bash vagrant@ubuntu-bionic:/rails/activerecord$ git status Untracked files: (use "git add <file>..." to include in what will be committed) db/ file::memory: ``` To prevent them from being accidentally committed I put 'file::memory:' to `activerecord/db/` folder and added the folder to .gitignore Also, we could consider fixing this by removing `db/` folder in each test that creates the folder. It would be great if someone confirms that it happens not only on my VM.
This commit is contained in:
parent
6d0895a489
commit
22877a9ddd
1
activerecord/.gitignore
vendored
1
activerecord/.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/db/
|
||||
/sqlnet.log
|
||||
/test/config.yml
|
||||
/test/fixtures/*.sqlite*
|
||||
|
@ -108,7 +108,7 @@ def shared_cache_flags
|
||||
def with_connection(options = {})
|
||||
db_config = ActiveRecord::Base.configurations.configs_for(env_name: "arunit", name: "primary")
|
||||
conn_options = options.reverse_merge(
|
||||
database: in_memory_db? ? "file::memory:" : db_config.database
|
||||
database: in_memory_db? ? "db/file::memory:" : db_config.database
|
||||
)
|
||||
conn = ActiveRecord::Base.sqlite3_connection(conn_options)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user