Skip to content

Commit

Permalink
failing test for #9869
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj Singh authored and jonleighton committed Apr 5, 2013
1 parent ba29581 commit f029fb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activerecord/test/cases/scoping/named_scoping_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,9 @@ def test_eager_default_scope_relations_are_deprecated
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
1 change: 1 addition & 0 deletions activerecord/test/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def self.all_as_method
end

class SpecialComment < Comment
scope :crazy_all, -> { where(body: 'go crazy').created }
end

class SubSpecialComment < SpecialComment
Expand Down

0 comments on commit f029fb0

Please sign in to comment.