Sha256: 04670df3f8a884ccdc16a8966a2b3ad7913aab363f28cf53574d4621a1b166d2
Contents?: true
Size: 572 Bytes
Versions: 30
Compression:
Stored size: 572 Bytes
Contents
require File.expand_path(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
30 entries across 30 versions & 1 rubygems