remove unnecessary test code
This commit is contained in:
parent
4ed6167e98
commit
a57b7842d0
@ -70,10 +70,6 @@ def test_scopes_with_string_name_can_be_composed
|
||||
assert_equal Topic.replied.approved, Topic.replied.approved_as_string
|
||||
end
|
||||
|
||||
def test_scopes_can_be_specified_with_deep_hash_conditions
|
||||
assert_equal Topic.replied.approved, Topic.replied.approved_as_hash_condition
|
||||
end
|
||||
|
||||
def test_scopes_are_composable
|
||||
assert_equal((approved = Topic.find(:all, :conditions => {:approved => true})), Topic.approved)
|
||||
assert_equal((replied = Topic.find(:all, :conditions => 'replies_count > 0')), Topic.replied)
|
||||
|
@ -11,11 +11,7 @@ class Topic < ActiveRecord::Base
|
||||
scope :scope_with_lambda, lambda { scoped }
|
||||
|
||||
scope :by_lifo, -> { where(:author_name => 'lifo') }
|
||||
|
||||
ActiveSupport::Deprecation.silence do
|
||||
scope :approved_as_hash_condition, :conditions => {:topics => {:approved => true}}
|
||||
scope :replied, :conditions => ['replies_count > 0']
|
||||
end
|
||||
scope :replied, -> { where 'replies_count > 0' }
|
||||
|
||||
scope 'approved_as_string', -> { where(:approved => true) }
|
||||
scope :anonymous_extension, -> { scoped } do
|
||||
|
Loading…
Reference in New Issue
Block a user