diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-04-20 20:12:24 -0400 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-04-20 20:12:24 -0400 |
commit | c03c519db0f5bcbb9f1151db5774921ea9bd3a22 (patch) | |
tree | 6bfb7c45be14884f41c79242cf54ce024afb2786 /activerecord/README.rdoc | |
parent | 1694b02909850c9d8f47fb644e98e1203d9f2898 (diff) | |
download | rails-c03c519db0f5bcbb9f1151db5774921ea9bd3a22.tar.gz rails-c03c519db0f5bcbb9f1151db5774921ea9bd3a22.tar.bz2 rails-c03c519db0f5bcbb9f1151db5774921ea9bd3a22.zip |
Relax assertions in connection config tests
At the moment these two ActiveRecord tests pass with `rake test:sqlite3`,
but fail with `ARCONN=sqlite3 bin/test`.
`Rails.root` is defined when running `bin/test`, but not when running
the rake task. When `Rails.root` is defined, `config[:database]` will
look something like `vagrant/rails/activerecord/db/primary.sqlite3`
instead of just `db/primary.sqlite3`.
(See https://github.com/rails/rails/blob/00caf95e14b90782ab17fbd6d2b930844df99980/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L27)
Relaxing `assert_equal` to `assert_match` will allow these tests to pass
regardless of how they are run.
I do have a question why we need both ways to run tests. I have been
using `bin/test` lately, but I see from #32426 that this is not the preferred
method.
Diffstat (limited to 'activerecord/README.rdoc')
0 files changed, 0 insertions, 0 deletions