Skip to content

Commit

Permalink
remove unnecessary test code
Browse files Browse the repository at this point in the history
  • Loading branch information
jonleighton committed Apr 27, 2012
1 parent 4ed6167 commit a57b784
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions activerecord/test/cases/named_scope_test.rb
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions activerecord/test/models/topic.rb
Expand Up @@ -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
Expand Down

0 comments on commit a57b784

Please sign in to comment.