mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
0d72489b2a
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. |
||
---|---|---|
.. | ||
console | ||
line_statistics | ||
profile | ||
README.md | ||
test.rb |
Rails dev tools
This is a collection of utilities used for Rails internal development. They aren't used by Rails apps directly.
console
drops you in irb and loads local Rails reposprofile
profilesKernel#require
to help reduce startup timeline_statistics
provides CodeTools module and LineStatistics class to count linestest
is loaded by every major component of Rails to simplify testing, for example:cd ./actioncable; bin/test ./path/to/actioncable_test_with_line_number.rb:5