diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-03-25 17:32:40 -0400 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-04-05 13:14:28 +0100 |
commit | f029fb07c210dd384f8ad02b5ce8903911c540d3 (patch) | |
tree | 4d67c5b27ed22d8969de8a8560c3171884aa9ef2 /activerecord | |
parent | ba29581e36c2ed330276d779d2ef0278cb874168 (diff) | |
download | rails-f029fb07c210dd384f8ad02b5ce8903911c540d3.tar.gz rails-f029fb07c210dd384f8ad02b5ce8903911c540d3.tar.bz2 rails-f029fb07c210dd384f8ad02b5ce8903911c540d3.zip |
failing test for #9869
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/scoping/named_scoping_test.rb | 5 | ||||
-rw-r--r-- | activerecord/test/models/comment.rb | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/scoping/named_scoping_test.rb b/activerecord/test/cases/scoping/named_scoping_test.rb index 3e2e6ab701..1ac68746de 100644 --- a/activerecord/test/cases/scoping/named_scoping_test.rb +++ b/activerecord/test/cases/scoping/named_scoping_test.rb @@ -459,4 +459,9 @@ class NamedScopingTest < ActiveRecord::TestCase end assert_equal [posts(:welcome).title], klass.all.map(&:title) end + + def test_subclass_merges_scopes_properly + assert_equal 1, SpecialComment.crazy_all.count + end + end diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index ede5fbd0c6..9d594bd7d6 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -29,6 +29,7 @@ class Comment < ActiveRecord::Base end class SpecialComment < Comment + scope :crazy_all, -> { where(body: 'go crazy').created } end class SubSpecialComment < SpecialComment |