aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-02-03 18:25:37 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2009-02-03 18:40:22 -0800
commit278186534c0ccf285a20497461f40d2e54aa20a0 (patch)
treeeb39e80e8e02fa6f7e04d7803efc1fccda63d3a4 /activerecord/test/cases/finder_test.rb
parent34a37ea9e8265972a93f0c4f62e44308c27751dd (diff)
downloadrails-278186534c0ccf285a20497461f40d2e54aa20a0.tar.gz
rails-278186534c0ccf285a20497461f40d2e54aa20a0.tar.bz2
rails-278186534c0ccf285a20497461f40d2e54aa20a0.zip
Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha.
Diffstat (limited to 'activerecord/test/cases/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb22
1 files changed, 10 insertions, 12 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb
index d4d770b04e..7fd7fd7a5b 100644
--- a/activerecord/test/cases/finder_test.rb
+++ b/activerecord/test/cases/finder_test.rb
@@ -507,21 +507,19 @@ class FinderTest < ActiveRecord::TestCase
assert_equal(2, Entrant.count_by_sql(["SELECT COUNT(*) FROM entrants WHERE id > ?", 1]))
end
- uses_mocha('test_dynamic_finder_should_go_through_the_find_class_method') do
- def test_dynamic_finders_should_go_through_the_find_class_method
- Topic.expects(:find).with(:first, :conditions => { :title => 'The First Topic!' })
- Topic.find_by_title("The First Topic!")
+ def test_dynamic_finders_should_go_through_the_find_class_method
+ Topic.expects(:find).with(:first, :conditions => { :title => 'The First Topic!' })
+ Topic.find_by_title("The First Topic!")
- Topic.expects(:find).with(:last, :conditions => { :title => 'The Last Topic!' })
- Topic.find_last_by_title("The Last Topic!")
+ Topic.expects(:find).with(:last, :conditions => { :title => 'The Last Topic!' })
+ Topic.find_last_by_title("The Last Topic!")
- Topic.expects(:find).with(:all, :conditions => { :title => 'A Topic.' })
- Topic.find_all_by_title("A Topic.")
+ Topic.expects(:find).with(:all, :conditions => { :title => 'A Topic.' })
+ Topic.find_all_by_title("A Topic.")
- Topic.expects(:find).with(:first, :conditions => { :title => 'Does not exist yet for sure!' }).times(2)
- Topic.find_or_initialize_by_title('Does not exist yet for sure!')
- Topic.find_or_create_by_title('Does not exist yet for sure!')
- end
+ Topic.expects(:find).with(:first, :conditions => { :title => 'Does not exist yet for sure!' }).times(2)
+ Topic.find_or_initialize_by_title('Does not exist yet for sure!')
+ Topic.find_or_create_by_title('Does not exist yet for sure!')
end
def test_find_by_one_attribute