Sha256: 97aaa59ba14d3b7d67421d94c28b575177ee0d81e0f80b2361384b38c625db85
Contents?: true
Size: 506 Bytes
Versions: 17
Compression:
Stored size: 506 Bytes
Contents
require "spec_helper" 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
17 entries across 17 versions & 1 rubygems