aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/autorun.rb
Commit message (Collapse)AuthorAgeFilesLines
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* * Don't eagerly require Rails' minitest plugin.Kasper Timm Hansen2017-07-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* 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
|
* Prevent multiple values being set to `run_via`yuuji.yaginuma2017-02-181-2/+2
| | | | | When executing the test via rake, since `rake` is set for `run_via`, `ruby` should not be set. Related 2cb6c27310452da11b93d729c3b760ce988106e1
* fffffff, Add code missing in 29f0fbdKasper Timm Hansen2016-09-251-2/+2
|
* Revise setting of run_with_rails_extension.Kasper Timm Hansen2016-09-251-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | The Rails test runner supports three ways to run tests: directly, via rake, or ruby. When Running with Ruby ala `ruby -Itest test/models/post_test.rb` our test file would be evaluated first, requiring `test_helper` and then `active_support/testing/autorun` that would then require the test file (which it hadn't been before) thus reevaluating it. This caused exceptions if using Active Support's declarative syntax. Fix this by shifting around when we set the how we're run to closer mimick the require order. If we're running with `bin/rails test` the test command file is run first and we then set `run_with_rails_extension`, later we hit `active_support/testing/autorun` and do nothing — because we've been run elsewhere. If we at this point haven't set `run_with_rails_extension` we've been running with `ruby` this whole time and thus we set that. We should always trigger `Minitest.autorun` as it doesn't hurt to call it twice. Consolidate the two methods into a single one that better brings out the intent of why they're there.
* applies new string literal convention in activesupport/libXavier Noria2016-08-061-2/+2
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* inline test runner check into `as/testing/autorun.rb`.Yves Senn2015-06-111-1/+8
| | | | | This makes it possible to easily get the runner working with existing setups that rely on `active_support/testing/autorun.rb`.
* oops. I should have only required minitest, not minitets/autorun. muscle memory.Ryan Davis2013-05-091-1/+1
|
* Updates to make rails 4 happy with minitest 5:Ryan Davis2013-05-061-2/+2
| | | | | | | | | | + Namespace changes, overhaul of runners. + Internal ivar name changes - Removed a logger globally applied to tests that spew everywhere?!? + Override Minitest#__run to sort tests by name. + Reworked testing isolation to work with the new cleaner architecture. - Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago. - Minor report output differences.
* Add active_support/testing/autorunRafael Mendonça França2012-12-311-0/+5
minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails