aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/clone_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix `CustomCops/AssertNot` to allow it to have failure messageRyuta Kamizono2018-05-131-2/+2
| | | | Follow up of #32605.
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-251-1/+1
|
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-9/+9
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix freeze applying to cloned objectsCaleb Thompson2013-04-151-0/+7
| | | | | | | | | | | | | | | | Previously, freezing a cloned ActiveRecord object froze the original too. By cloning `@attributes` before freezing, we prevent cloned objects (which in Ruby share state of ivars) from being effected by `#freeze`. Resolves issue #4936, which has further information on this issue, as well as steps to reproduce. * Add a test case for `#freeze` not causing `cloned.frozen?` to be true. * Clone @attributes before freezing in `ActiveRecord::Core`, then reassign the cloned, frozen hash to the frozen model's `@attributes` ivar. /cc @steveklabnik
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* adding a specific case for clone testingAaron Patterson2010-11-231-0/+33