| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fractional Seconds supported version is 5.6.4 or higher.
http://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
|
|
|
|
|
|
|
|
|
| |
Specifically, versions of MySQL prior to 5.6 do not support this, which
is what's used on Travis by default. The method `mysql_56?` appeared to
only ever be used to conditionally apply subsecond precision, so I've
generalized it and used it more liberally.
This should fix the test failures caused by #20317
|
| |
|
|
|
|
| |
support it. Fixes #19711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I’m renaming all instances of `use_transcational_fixtures` to
`use_transactional_tests` and “transactional fixtures” to
“transactional tests”.
I’m deprecating `use_transactional_fixtures=`. So anyone who is
explicitly setting this will get a warning telling them to use
`use_transactional_tests=` instead.
I’m maintaining backwards compatibility—both forms will work.
`use_transactional_tests` will check to see if
`use_transactional_fixtures` is set and use that, otherwise it will use
itself. But because `use_transactional_tests` is a class attribute
(created with `class_attribute`) this requires a little bit of hoop
jumping. The writer method that `class_attribute` generates defines a
new reader method that return the value being set. Which means we can’t
set the default of `true` using `use_transactional_tests=` as was done
previously because that won’t take into account anyone using
`use_transactional_fixtures`. Instead I defined the reader method
manually and it checks `use_transactional_fixtures`. If it was set then
it should be used, otherwise it should return the default, which is
`true`. If someone uses `use_transactional_tests=` then it will
overwrite the backwards-compatible method with whatever they set.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.
Conflicts:
actionmailer/test/abstract_unit.rb
actionview/test/abstract_unit.rb
activemodel/test/cases/helper.rb
activerecord/test/cases/helper.rb
activesupport/test/abstract_unit.rb
railties/test/abstract_unit.rb
|
|
|
|
|
|
|
|
| |
The cause by which the test suite for the mysql adapter broke in 1502cae
(reverted 89ba5bb) is because the precision was not extracted.
The rounding problem in mysql adapter has not been fixed, but `mysql_56`
helper tested only mysql2 adapter, its behavior was not apparent.
|
|
|
|
|
| |
This finally removes the warning "WARNING: there is no transaction in progress"
when running Active Record tests using PostgreSQL.
|
|
|
|
|
|
| |
The types that are affected by `time_zone_aware_attributes` (which is on
by default) have been made configurable, in case this is a breaking
change for existing applications.
|
|
|
|
|
|
|
|
| |
Before this change any error raised inside a transaction callback
are rescued and printed in the logs.
Now these errors are not rescue anymore and just bubble up,
as the other callbacks.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|