aboutsummaryrefslogtreecommitdiffstats
path: root/tools/test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in tools/Koichi ITO2017-08-131-0/+2
|
* * Don't eagerly require Rails' minitest plugin.Kasper Timm Hansen2017-07-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making the Rails minitest behave like a standard minitest plugin we're much more likely to not break when people use other minitest plugins. Like minitest-focus and pride. To do this, we need to behave like minitest: require files up front and then perform the plugin behavior via the at_exit hook. This also saves us a fair bit of wrangling with test file loading. Finally, since the environment and warnings options have to be applied as early as possible, and since minitest loads plugins at_exit, they have to be moved to the test command. * Don't expect the root method. It's likely this worked because we eagerly loaded the Rails minitest plugin and that somehow defined a root method on `Rails`. * Assign a backtrace to failed exceptions. Otherwise Minitest pukes when attempting to filter the backtrace (which Rails' backtrace cleaner then removes). Means the exception message test has to be revised too. This is likely caused by the rails minitest plugin now being loaded for these tests and assigning a default backtrace cleaner.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Adds missing minor doc about tools/test.rb [ci skip]Marc Ignacio2017-06-211-1/+1
| | | | ... and minor typo fix
* Prevent a redefinition warning when the real Rails.root appearsMatthew Draper2017-05-261-2/+3
|
* Prevent multiple values being set to `run_via`yuuji.yaginuma2017-02-181-1/+1
| | | | | When executing the test via rake, since `rake` is set for `run_via`, `ruby` should not be set. Related 2cb6c27310452da11b93d729c3b760ce988106e1
* make work bin/test scripts with line filteryuuji.yaginuma2016-12-171-0/+3
| | | | | `Rails::LineFiltering` is not automatically loaded, need to load it explicitly. Ref: 797f1dd, b6f935b
* update bin/test scripts to prevent double runs.Yves Senn2016-11-211-0/+2
| | | | | The test runner was updated to make use of autorun. This caused the `bin/test` scripts to run Minitest twice.
* applies new string literal convention in toolsXavier Noria2016-08-061-1/+1
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove requiring load_paths from tools/test.rbPrathamesh Sonpatki2016-03-021-1/+4
| | | | | | | - Instead require and setup Bundler - `tools/test.rb` is used internally from all `bin/test` scripts inside component gems. - Followup of https://github.com/rails/rails/commit/2abcdfd978fdcd491576a237e8c6be04ddaf884d.
* make it possible to customize the executable inside rereun snippets.Yves Senn2015-06-131-0/+2
| | | | | | | | | | | | | | | | | | | In the Rails repository we use a `bin/test` executable to run our tests. However the rerun snippets still included `bin/rails test`: BEFORE: ``` Failed tests: bin/rails test test/cases/adapters/postgresql/schema_test.rb:91 ``` AFTER: ``` Failed tests: bin/test test/cases/adapters/postgresql/schema_test.rb:91 ```
* select the AR adapter through `bin/test`.Yves Senn2015-06-111-2/+0
|
* use our runner (`bin/test`) for framework components.Yves Senn2015-06-111-0/+12
This adds a script `bin/test` to most Rails framework components. The script uses the rails minitest plugin to augment the runner. See https://github.com/rails/rails/pull/19571 for details about the plugin. I did not yet add `bin/test` for activerecord, activejob and railties. These components rely on specific setup performed in the rake-tasks.