1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Ryuta Kamizono
9b8fb3fc04 Enable Layout/ClosingHeredocIndentation cop 2019-11-24 09:44:32 +09:00
Edouard CHIN
d4367eb726 Modify ActiveRecord::TestFixtures to not rely on AS::TestCase:
- ### Problem

  If one wants to use ActiveRecord::TestFixtures it is mandatory for
  the test suite to inherit from `ActiveSupport::TestCase`.
  TestFixtures makes use of specific method from AS::TestCase
  (`file_fixture_path` and `method_name`).

  ### Solution

  This PR fixes that by not making use of method_name and file_fixture_path.
2019-11-22 12:16:53 +01:00
Kir Shatrov
831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Rafael Mendonça França
3955218dc1
Remove deprecated #use_transactional_fixtures configuration 2016-12-29 17:53:04 -05:00
yuuji.yaginuma
32225387c1 use public Module#include instead of send :include
Follow up to #18767
2016-11-27 22:20:52 +09:00
Xavier Noria
9617db2078 applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:26:53 +02:00
Akira Matsuda
64766e82d6 🔪 Typos 2015-09-21 03:17:39 +09:00
Brandon Weiss
0965863564 Closes rails/rails#18864: Renaming transactional fixtures to transactional tests
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.
2015-03-16 11:35:44 -07:00