1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Yasuo Honda
a3f1eb5ebe Active Record bin/test command runs only its own adapter tests
There are two ways to run unit tests. `bundle exec rake test` and
`bin/test`. Active Record `bundle exec rake test` only executes its
own adapter specific tests. on the other hand, `bin/test` executes all
adapter specfic tests then some test files need to have `if
current_adapter?`, which can be removed.

- Removed `require_relative "../../tools/test"` to require its own one
- `default_test_exclude_glob` excludes all of adapter specific tests.
- `list_tests(argv)` adds its own adapter specific tests
- `adapter_short` method extracted to get the short hand adapter name
  like `sqlite3`, `mysql2` and `postgresql` via `ENV["ARCONN"]`
2021-09-07 21:34:56 +09:00
yuuji.yaginuma
5d1999547d Make test runner work with AR test tool
Since #29572, test runner will be loaded as minitest's plugin.
Therefore, if specify a value in `Minitest.extensions` before the Minitest
initialization process, the extension will not load and the test runner will
not work.
44eee51ed9/lib/minitest.rb (L86)

Also, load processing of adapter is done before minitest option processing,
so set the adapter in the file so that the `-a` option works.
2018-02-04 20:19:46 +09:00
Kir Shatrov
831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
6673cf7071
Use require_relative instead of require with full path 2017-06-14 12:10:17 +03:00
Yves Senn
2b4a9735d8 update bin/test scripts to prevent double runs.
The test runner was updated to make use of autorun. This caused the
`bin/test` scripts to run Minitest twice.
2016-11-21 17:25:12 +01:00
Xavier Noria
432222fae1 prefer __dir__ over __FILE__ in File.expand_path
Thinking .. relative to files is not natural, we are used
to think "parent of a directory", and we have __dir__
nowadays.
2016-08-11 01:03:14 +02:00
Xavier Noria
e6ab70c439 applies new string literal convention to the rest of the project
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:28:46 +02:00
Abdelkader Boudih
fb24d0ed6c Remove legacy mysql adapter 2015-12-17 15:54:57 +00:00
Yves Senn
9946788775 select the AR adapter through bin/test. 2015-06-11 14:24:56 +02:00
Yves Senn
81ae632d08 make it possible to run AR tests with bin/test 2015-06-11 14:12:16 +02:00