Sha256: 7c391f19a695612a4e940e5e8a74c65c5086845b698583a067aa4890759c6c21
Contents?: true
Size: 554 Bytes
Versions: 24
Compression:
Stored size: 554 Bytes
Contents
require File.join(File.dirname(__FILE__), "/../../../spec_helper.rb") describe Mongoid::Commands::DestroyAll do describe "#execute" do before do @doc = mock @docs = [@doc] @klass = mock @conditions = { :conditions => { :title => "Sir" } } end it "destroys each document that the criteria finds" do @klass.expects(:find).with(:all, @conditions).returns(@docs) Mongoid::Commands::Destroy.expects(:execute).with(@doc) Mongoid::Commands::DestroyAll.execute(@klass, @conditions) end end end
Version data entries
24 entries across 24 versions & 1 rubygems