| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Add this rake task to test channels only.
We've added `rails test:mailboxes` recently in the same way #34828.
|
| |
|
|
|
|
| |
This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
Some case expressions remain, need to think about those ones.
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
| |
Closes #23027.
This does not restore complete backwards compatibility. It simply passes
the contets of the `TEST` env to the new runner.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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/
|
|
|
|
| |
bundle exec db:migrate rake was not working, with the new runner, before this commit
|
| |
|
| |
|
|
|
|
|
|
| |
Change originated from https://github.com/rails/rails/pull/17739#issuecomment-64829088
/cc @metaskills
|
|
|
|
| |
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`
|
| |
|
|
|
|
| |
remove unused requires
|
|
|
|
|
| |
According to #5ecd12 change.
[ci skip]
|
|
|
|
| |
rake task included in test:all rake task.
|
| |
|
|
|
|
|
| |
I'm defining a new class which modularizes how the `rake test` tasks are
defined and invoked.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The `rake test:recent` and `rake test:uncommitted` tasks were
deprecated and are now being removed.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| | |
|
| |
| |
| |
| | |
rake test path/to/test.rb
|
| | |
|
| |
| |
| |
| | |
This reverts commit b51673fbd9563bd3ffa22e22255ca1cef80cfb6d.
|
|/
|
|
| |
This reverts commit 106e15927f0dd8060fc37eff44b823a92fa94bd2.
|
|
|
|
| |
warning: assigned but unused variable - task_name
|
|
|
|
|
| |
Also, print out deprecation warning for other rake tasks except
`rake test` and `rake` (default)
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
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]]
|
| |
|
| |
|