diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2016-09-02 15:40:59 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2016-09-02 18:51:39 +0000 |
commit | 1f0112dfc38b1044639fed3ca0d6f1c203f97394 (patch) | |
tree | 4eed8b4b6d5a646d802eb8ff9948db33aa0f0f66 /activerecord/test | |
parent | 55c5dffd9f2220507ff1a7635c00a81577a8a391 (diff) | |
download | rails-1f0112dfc38b1044639fed3ca0d6f1c203f97394.tar.gz rails-1f0112dfc38b1044639fed3ca0d6f1c203f97394.tar.bz2 rails-1f0112dfc38b1044639fed3ca0d6f1c203f97394.zip |
Change require order to come `require "models/post"` before `require "models/comment"`
to address BasicsTest#test_readonly_attributes failure #26368
It reproduces only when both of these conditions are satisfied:
- Other test files `autosave_association_test.rb` or `where_test.rb`
which executes `require "models/comment"` then `require "models/post"`
- When `autosave_association_test.rb` or `where_test.rb` executed before `base_test.rb`
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/relation/where_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 7eae2363f8..08df945063 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -1,5 +1,6 @@ require "cases/helper" require "models/bird" +require "models/post" require "models/comment" require "models/company" require "models/customer" @@ -11,7 +12,6 @@ require "models/order" require "models/parrot" require "models/person" require "models/pirate" -require "models/post" require "models/reader" require "models/ship" require "models/ship_part" diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index ce4e041793..925af49ffe 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -4,10 +4,10 @@ require "models/binary" require "models/cake_designer" require "models/car" require "models/chef" +require "models/post" require "models/comment" require "models/edge" require "models/essay" -require "models/post" require "models/price_estimate" require "models/topic" require "models/treasure" |