aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_unit/testing.rake
Commit message (Collapse)AuthorAgeFilesLines
* Add `rails test:channels`.bogdanvlviv2019-01-161-1/+1
| | | | | Add this rake task to test channels only. We've added `rails test:mailboxes` recently in the same way #34828.
* Add Rake task for testing mailboxesGeorge Claghorn2018-12-301-1/+1
|
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* * Don't eagerly require Rails' minitest plugin.Kasper Timm Hansen2017-07-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Update system test runner docseileencodes2017-05-141-0/+1
| | | | | | | | | It wasn't clear that system tests don't run with the rest of the test suite and are part of a separate command. This documents the `test:system` command as well as update the Rails runner help documentation to make it clearer that system tests are run via their own command by default.
* Avoid running system tests by defaultRobin Dupret2017-03-051-5/+5
| | | | | | | | | | These tests may be expansive so let's only allow users to run them through `bin/rails test:system` or by passing a path to the `test` command. The same applies for `bin/rake test`. Refs #28109.
* Add generators and ability to run system testseileencodes2017-02-201-0/+5
| | | | | | | * Generates system test requirements with new Rails app * Includes required default gems in Gemfile for Rails app * Generates a single system test case * Generates a system test case with scaffold
* revises most Lint/EndAlignment offensesXavier Noria2016-08-071-3/+3
| | | | Some case expressions remain, need to think about those ones.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-1/+1
|
* modernizes hash syntax in railtiesXavier Noria2016-08-061-5/+5
|
* applies new string literal convention in railties/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* bring back `TEST` env for `rake test`.Yves Senn2016-01-121-1/+6
| | | | | | | Closes #23027. This does not restore complete backwards compatibility. It simply passes the contets of the `TEST` env to the new runner.
* modify to pass the correct argument to the test runner from rakeyuuji.yaginuma2015-09-081-5/+5
| | | | | | | | test runner sets file to be tested in plugin_rails_options, but in plugin_rails_options, processing has been made to the argument of the actual command rather than the argument of Minitest.run. For example, if you run `./bin rake db:migrate test`, the options[:patterns], `db:migrate test` was incorrectly set.
* Improve test runner's Minitest integration.Kasper Timm Hansen2015-06-041-7/+8
| | | | | | | | | | | This also adds free mix and matching of directories, files and lines filters. Like so: bin/rails test models/post_test.rb test/integration models/person_test.rb:26 You can also mix in a traditional Minitest filter: bin/rails test test/integration -n /check_it_out/
* Fix test rake when passing multiple argumentsArthur Neves2015-03-191-2/+2
| | | | bundle exec db:migrate rake was not working, with the new runner, before this commit
* Use Rails::TestRunner on rake testArthur Neves2015-03-181-16/+17
|
* Remove deprecated `test:all` and `test:all:db` tasksRafael Mendonça França2015-01-041-23/+0
|
* docs, AR no longer makes use of `test:prepare`. [ci skip]Yves Senn2014-11-281-1/+2
| | | | | | Change originated from https://github.com/rails/rails/pull/17739#issuecomment-64829088 /cc @metaskills
* Simplify rake test vs rake test:allDavid Geukers2014-11-101-3/+20
| | | | Renames `rake test:all` to `rake test` by changing old `rake test:run` to previous version of `rake test:all`. Removes old definition of `rake test`. Also renames `rake test:all:db` to `rake test:db` and deprecates `rake test:all` & `rake test:all:db`
* Add `test:jobs` taskyuuji.yaginuma2014-09-151-3/+3
|
* rbconfig is not used in these filesArun Agrawal2013-12-261-1/+0
| | | | remove unused requires
* Update testing.rake with more accurate description of test task.Josef Šimánek2013-10-291-1/+1
| | | | | According to #5ecd12 change. [ci skip]
* Added generated unit test for generator generator and new test:generators ↵Josef Šimánek2013-07-161-1/+5
| | | | rake task included in test:all rake task.
* Removed unused deprecation requires.Paul Nikitochkin2013-07-031-1/+0
|
* Making the rake file for tests easier to read.wangjohn2013-06-251-12/+1
| | | | | I'm defining a new class which modularizes how the `rake test` tasks are defined and invoked.
* Removing deprecation message and silencing method.wangjohn2013-06-261-18/+0
| | | | | | | | The deprecation rake task is no longer useful because the deprecated methods have already been removed. The method for silencing stderr has been removed since it was only useful for `rake test:uncommitted` which was deprecated and removed.
* Removing deprecated rake tasks.wangjohn2013-06-241-62/+0
| | | | | The `rake test:recent` and `rake test:uncommitted` tasks were deprecated and are now being removed.
* Refactoring the creation of TestTasks to remove code duplication.wangjohn2013-05-021-18/+4
|
* remove unused variablesVipul A M2013-04-061-1/+0
|
* extract test info from the command line and set up the test taskAaron Patterson2013-04-051-4/+6
|
* Update Rake tasks to call `rails test` insteadPrem Sichanugrist2013-04-051-7/+10
| | | | | | | | | Also, print out deprecation warning for other rake tasks except `rake test` and `rake` (default) Conflicts: railties/lib/rails/test_unit/testing.rake railties/test/application/rake_test.rb
* Merge branch 'master' into railstestAaron Patterson2013-04-051-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (44 commits) Improve the changelog entry [ci skip] Fix explicit names on multiple file fields Correctly parse bigint defaults in PostgreSQL Move changelog to the top [ci skip] Fix indent and remove extra white spaces Fix scope chaining + STI failing test for #9869 Improve `belongs_to touch: true` timestamp test Sort modules in alphabetical order. Avoid an attempt to fetch old record when id was not present in touch callback Use the correct pk field from the reflected class to find the old record Refactor mail_to to not generate intermediate hashes when adding href Ensure mail_to helper does not modify the given html options hash Use inspect when writing the foreign key from the reflection Use a space after the comment sign when showing the result of commands Exclude template files for rdoc API [ci skip] template should have generic name use | to have more intent revealing code Revert "Merge pull request #10034 from benofsky/fix_skipping_object_callback_filters" stop depending on callbacks ... Conflicts: railties/test/application/rake_test.rb
* | check pending migrations against the test dbAaron Patterson2013-04-031-15/+1
| |
* | a test file can be provided to rake, e.g.:Aaron Patterson2013-04-031-1/+10
| | | | | | | | rake test path/to/test.rb
* | switch to Rails::TestTaskAaron Patterson2013-04-031-24/+11
| |
* | Revert "Update Rake tasks to call `rails test` instead"Aaron Patterson2013-04-031-28/+52
| | | | | | | | This reverts commit b51673fbd9563bd3ffa22e22255ca1cef80cfb6d.
* | Revert "Warning removed unused variable task_name"Aaron Patterson2013-04-031-0/+1
|/ | | | This reverts commit 106e15927f0dd8060fc37eff44b823a92fa94bd2.
* Warning removed unused variable task_nameArun Agrawal2013-03-151-1/+0
| | | | warning: assigned but unused variable - task_name
* Update Rake tasks to call `rails test` insteadPrem Sichanugrist2013-03-091-52/+28
| | | | | Also, print out deprecation warning for other rake tasks except `rake test` and `rake` (default)
* Added test:all and test:all:db tasks to speed up full test runs.Ryan Davis2013-02-041-0/+12
| | | | | | | | | | Speed up depends on the number of test phases (N) you have for your app, but it is roughly a 1/N improvement. In my app, it goes from 15.51s to 5.56s. Inspired by http://ngauthier.com/2012/02/quick-tests-with-bash.html Reviewed by @tenderlove
* remove performance tests from the default stackYves Senn2013-01-101-1/+1
|
* extract PerformanceTest into rails-performance_tests gemYves Senn2013-01-101-11/+0
|
* Rake test:uncommitted finds git directory in ancestors.Nicolas Despres2012-11-101-1/+1
| | | | | | | | | | | | | Sometimes your git directory is an ancestor of your application root directory. For example: ./repo/.git/ ./repo/app/Rakefile In this case rake test:uncommitted will be unable to detect your SCM. This patch fixes this and add a test.
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-14/+14
|
* Update test locationsMike Moore2012-10-091-6/+30
| | | | | | | | | | | | | | Change the default test locations to avoid confusion around the common testing terms "unit" and "functional". Add new rake tasks for the new locations, while maintaining backwards compatibility with the old rake tasks. New testing locations are as follows: app/models -> test/models (was test/units) app/helpers -> test/helpers (was test/units/helpers) app/controllers -> test/controllers (was test/functional) app/mailers -> test/mailers (was test/functional)
* Revert "Use flat_map { } instead of map {}.flatten"Santiago Pastorino2012-10-051-2/+2
| | | | | | | | | | | This reverts commit abf8de85519141496a6773310964ec03f6106f3f. We should take a deeper look to those cases flat_map doesn't do deep flattening. irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten => [1, 3, 1, 2] irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i} => [[1, 3], [1, 2]]
* Use flat_map { } instead of map {}.flattenSantiago Pastorino2012-10-051-2/+2
|
* ignore .gitignore'd files in rake test:uncomittedAkira Matsuda2012-06-121-1/+1
|