mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
failing test for #9869
This commit is contained in:
parent
ba29581e36
commit
f029fb07c2
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -29,6 +29,7 @@ class Comment < ActiveRecord::Base
|
|||
end
|
||||
|
||||
class SpecialComment < Comment
|
||||
scope :crazy_all, -> { where(body: 'go crazy').created }
|
||||
end
|
||||
|
||||
class SubSpecialComment < SpecialComment
|
||||
|
|
Loading…
Reference in a new issue