Permalink
Browse files

Added spec to make sure multiple records are pulled from cache.

  • Loading branch information...
1 parent daab6e0 commit b871f00188aa983066f84d20cb80b33a7aae0cf8 John Markos O'Neill committed Oct 27, 2010
Showing with 7 additions and 1 deletion.
  1. +1 −1 Rakefile
  2. +6 −0 spec/cash/finders_spec.rb
View
@@ -25,7 +25,7 @@ jt = Jeweler::Tasks.new do |gem|
gem.description = "Write-through and Read-through Cacheing for ActiveRecord"
gem.email = "teamplatform@ngmoco.com"
gem.homepage = "http://github.com/ngmoco/cache-money"
- gem.authors = ["Nick Kallen","Ashley Martens","Scott Mace","John Markos"]
+ gem.authors = ["Nick Kallen","Ashley Martens","Scott Mace","John O'Neill"]
gem.has_rdoc = false
gem.files = FileList[
"README",
@@ -386,6 +386,12 @@ module Cash
Short.find(:all, :conditions => { :subtitle => @short1.subtitle },
:order => 'title').map(&:id).should == [@short2.id, @short1.id]
end
+
+ it 'pulls multiple objects from the cache, not the database' do
+ mock(Story.connection).execute.never
+ Short.find(:all, :conditions => { :subtitle => @short1.subtitle },
+ :order => 'title').should_not be_empty
+ end
end
describe '#find(1)' do

0 comments on commit b871f00

Please sign in to comment.