| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Goals:
1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase
Fixes #16769
|
| |
|
|
|
|
|
|
|
|
|
| |
We're seeing too many failures to believe otherwise.
This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57,
cbde413df3839e06dd14e3c220e9800af91e83ab,
bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and
2440933fe2c27b27bcafcd9019717800db2641aa.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, Active Record will rescue any errors raised within
after_rollback/after_create callbacks and print them to the
logs. Next versions of rails will not rescue those errors anymore,
and just bubble them up, as the other callbacks.
This adds a opt-in flag to enable that behaviour, of not rescuing
the errors.
Example:
# For not swallow errors in after_commit/after_rollback
config.active_record.errors_in_transactional_callbacks = true
[fixes #13460]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
|
|
|
|
|
|
|
|
|
|
|
| |
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
|
|
|
|
|
|
| |
With ActiveRecord::Properties, we now have a reasonable path for users
to continue to keep this behavior if they want it. This is an edge case
that has added a lot of complexity to the code base.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Auto-generate stable fixture UUIDs on PostgreSQL
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/fixtures.rb
activerecord/test/cases/adapters/postgresql/uuid_test.rb
activesupport/CHANGELOG.md
|
| |
| |
| |
| | |
Fixes: #11524
|
| |
| |
| |
| |
| |
| |
| | |
Follow-Up to https://github.com/rails/rails/pull/14400
This ensures that all tables are removed after each test and thereby
allowing us to run the tests in a random order.
|
|/ |
|
| |
|
|
|
|
|
| |
We can now make use of the existent #travel/#travel_to helper methods
added to AS test case and available in all tests.
|
|
|
| |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
|
|
|
|
|
| |
Raising `RuntimeErrors` skips important cleanup code and leads to
a lot of subsequent errors. This clutters the test output with a lot
of noise.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This fix also makes the test order independent.
|
|
|
|
| |
this would give us some more clues in case a test silently dies inside Thread
|
|
|
|
|
| |
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
|
|
|
|
|
|
| |
This reverts commit a3024f81228d7b3b446408114a5dc2a86870cd35.
REASON: Since warning doesn't exist
|
| |
|
| |
|
|
|
|
| |
Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`. Instances of this class normally hold a collection of fixtures (records) loaded either from a single YAML file, or from a file and a folder with the same name. This change make the class name singular and makes the class easier to distinguish from the modules like `ActiveRecord::TestFixtures`, which operates on multiple fixture sets, or `DelegatingFixtures`, `::Fixtures`, etc., and from the class `ActiveRecord::Fixture`, which corresponds to a single fixture.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not really a good idea to have this as a global config option. We
should allow people to specify the behaviour per association.
There will now be two new values:
* :dependent => :restrict_with_exception implements the current
behaviour of :restrict. :restrict itself is deprecated in favour of
:restrict_with_exception.
* :dependent => :restrict_with_error implements the new behaviour - it
adds an error to the owner if there are dependent records present
See #4727 for the original discussion of this.
|
| |
|
|
|
|
|
| |
Mocha is already required by AS::TestCase, so remove the duplicate
requires.
|
| |
|
| |
|
|
|
|
|
|
| |
Rename some parameters and instance and local variables, mostly in fixtures.rb. Also remove an unused assignment to an instance variable.
There are minor code changes.
|
| |
|
| |
|
|
|
|
| |
requires SQLCounter which was moved to AR internal tests only.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This reverts commit d80e4ee20e690dfc0f4ec31c41b873d607462872.
No need to care about 1.8 anymore, so reverting :)
|
| |
|
| |
|