aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* get rid of transaction warning when running PG tests.Yves Senn2015-02-121-1/+1
| | | | | This finally removes the warning "WARNING: there is no transaction in progress" when running Active Record tests using PostgreSQL.
* Time columns should support time zone aware attributesSean Griffin2015-01-151-0/+3
| | | | | | 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.
* Change transaction callbacks to not swallowing errors.Rafael Mendonça França2015-01-041-3/+0
| | | | | | | | 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.
* Remove redundant `to_s` in interpolationclaudiob2014-10-301-3/+3
|
* speed up fixtures by not loading all their classesgrosser2014-10-061-13/+0
|
* Default to sorting user's test cases for nowGodfrey Chan2014-09-081-1/+1
| | | | | | | | | | | 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
* Added enable_extension! to helperAbdelkader Boudih2014-09-051-3/+11
|
* Leave all our tests as order_dependent! for nowMatthew Draper2014-09-021-0/+5
| | | | | | | | | We're seeing too many failures to believe otherwise. This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57, cbde413df3839e06dd14e3c220e9800af91e83ab, bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and 2440933fe2c27b27bcafcd9019717800db2641aa.
* MySQL: skip GTID-unsafe statement tests when enforce_gtid_consistency is enabledJeremy Kemper2014-09-011-0/+4
|
* adding the exception RecordNotFound to UUID findJoseLuis Torres2014-08-211-1/+1
|
* Add option to stop swallowing errors on callbacks.Arthur Neves2014-08-181-0/+3
| | | | | | | | | | | | | | | 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]
* Finally! None of our tests are order_dependent!Akira Matsuda2014-08-141-5/+0
|
* :bomb:Rafael Mendonça França2014-08-121-1/+1
|
* Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
|
* users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+5
| | | | | 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.
* Stop requiring mocha automaticallyRafael Mendonça França2014-07-191-0/+2
| | | | | | | | | | | 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
* Deprecate decimal columns being automatically treated as integersSean Griffin2014-05-271-0/+1
| | | | | | 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.
* Merge pull request #12016 from roderickvd/uuid_fixesRafael Mendonça França2014-04-041-0/+9
|\ | | | | | | | | | | | | | | | | | | 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
| * Auto-generate stable fixture UUIDs on PostgreSQL.Roderick van Domburg2014-01-071-0/+9
| | | | | | | | Fixes: #11524
* | Refactor test to use DdlHelper.Guo Xiang Tan2014-03-291-1/+1
| | | | | | | | | | | | | | 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.
* | Test microsecond on mysql 5.6Arthur Neves2014-03-121-0/+5
|/
* Disable available locales checks to avoid warnings running the testsCarlos Antonio da Silva2013-12-171-0/+3
|
* Get rid of hack for freezing time on AR testsCarlos Antonio da Silva2013-12-121-18/+0
| | | | | We can now make use of the existent #travel/#travel_to helper methods added to AS test case and available in all tests.
* Warnings removed for ruby trunkArun Agrawal2013-11-011-1/+1
| | | Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
* only warn on leaked time zone state instead of rasing an error.Yves Senn2013-10-251-3/+6
| | | | | | Raising `RuntimeErrors` skips important cleanup code and leads to a lot of subsequent errors. This clutters the test output with a lot of noise.
* prevent global timezone state from leaking out of test cases.Yves Senn2013-10-251-3/+47
|
* log the statement name along with the SQLAaron Patterson2013-10-041-0/+3
|
* rm LogIntercepterAaron Patterson2013-10-041-15/+0
|
* stop adding singleton methods to the mysql2 adapterAaron Patterson2013-10-041-0/+15
|
* interceptor should mimick original methodNeeraj Singh2013-07-291-1/+1
| | | | This fix also makes the test order independent.
* Set Thread.abort_on_exception for the whole AS, AP, and AR testsAkira Matsuda + Koichi Sasada2013-01-241-0/+2
| | | | this would give us some more clues in case a test silently dies inside Thread
* Add active_support/testing/autorunRafael Mendonça França2012-12-311-2/+1
| | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* Revert "Fix annoy warning, when executing testcase."Andrey Deryabin2012-11-301-2/+0
| | | | | | This reverts commit a3024f81228d7b3b446408114a5dc2a86870cd35. REASON: Since warning doesn't exist
* Fix typo in module name and make #in_time_zone privateCarlos Antonio da Silva2012-11-171-1/+3
|
* Extract #in_time_zone helper method duplication to a moduleCarlos Antonio da Silva2012-11-171-0/+13
|
* Rename "Fixtures" class to "FixtureSet"Alexey Muranov2012-10-071-1/+1
| | | | 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.
* Fix annoy warning, when executing testcase.kennyj2012-09-111-0/+2
|
* Remove the dependent_restrict_raises option.Jon Leighton2012-08-101-3/+0
| | | | | | | | | | | | | | | 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.
* load active_support/deprecation in active_support/railsXavier Noria2012-08-021-1/+1
|
* remove duplicate requires of mocha.Aaron Patterson2012-07-031-1/+0
| | | | | Mocha is already required by AS::TestCase, so remove the duplicate requires.
* Fix logs name consistency.kennyj2012-05-191-0/+16
|
* port some mocha to minitest/mockAaron Patterson2012-05-181-0/+1
|
* Rename some variablesAlexey Muranov2012-05-091-2/+2
| | | | | | 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.
* fix tests for SQLite3AdapterAndrey Deryabin2012-04-271-1/+1
|
* Remove IdentityMapCarlos Antonio da Silva2012-03-131-3/+0
|
* Get ActiveRecord::TestCase back on its feet, despite deprecation. It ↵Jeremy Kemper2012-02-051-31/+0
| | | | requires SQLCounter which was moved to AR internal tests only.
* fix a typo [ci skip]Vijay Dev2012-02-011-1/+1
|
* Remove deprecation warnings from testsRafael Mendonça França2012-01-311-0/+3
|
* Moving AR::TestCase in to the AR tests directoryAaron Patterson2012-01-241-1/+1
|
* require test/unit and sort test orderAaron Patterson2012-01-061-1/+1
|