1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/connection_adapters
Daniel Colson c03c519db0 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 00caf95e14/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.
2018-04-20 20:12:24 -04:00
..
adapter_leasing_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
connection_handler_test.rb Relax assertions in connection config tests 2018-04-20 20:12:24 -04:00
connection_specification_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
merge_and_resolve_default_url_config_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
mysql_type_lookup_test.rb Merge remote-tracking branch 'origin/master' into unlock-minitest 2017-08-01 17:34:14 -04:00
schema_cache_test.rb Don't update counter cache when through record was not destroyed 2018-01-14 20:46:19 +00:00
type_lookup_test.rb Revert commit 4ec5b0d6b4 in favor of #28379 2018-01-07 10:17:36 +09:00