aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-04-27 10:30:52 +0100
committerJon Leighton <j@jonathanleighton.com>2012-04-27 10:30:52 +0100
commita57b7842d0fcdcbcc567532d3a5c1f2628057a0d (patch)
tree5078ab391fb62beb1593a4741ade8cf36aac8a47 /activerecord
parent4ed6167e985ed41311d979371813f22fcb0143b7 (diff)
downloadrails-a57b7842d0fcdcbcc567532d3a5c1f2628057a0d.tar.gz
rails-a57b7842d0fcdcbcc567532d3a5c1f2628057a0d.tar.bz2
rails-a57b7842d0fcdcbcc567532d3a5c1f2628057a0d.zip
remove unnecessary test code
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/named_scope_test.rb4
-rw-r--r--activerecord/test/models/topic.rb6
2 files changed, 1 insertions, 9 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb
index cc64afaa71..aa36a02982 100644
--- a/activerecord/test/cases/named_scope_test.rb
+++ b/activerecord/test/cases/named_scope_test.rb
@@ -70,10 +70,6 @@ class NamedScopeTest < ActiveRecord::TestCase
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)
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index ef9de9669c..079e403444 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -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