Sha256: 316861ac9fa9cc825c3ce4726290516b0028fdad6e9dff821baddf71d3c43908
Contents?: true
Size: 754 Bytes
Versions: 19
Compression:
Stored size: 754 Bytes
Contents
require "spec_helper" describe Mongoid::Collections::Master do let(:collection) do stub.quacks_like(Mongo::Collection.allocate) end let(:db) do stub.quacks_like(Mongo::DB.allocate) end let(:master) do Mongoid::Collections::Master.new(db, "people") end before do db.expects(:collection).with("people").returns(collection) end context "Mongo::Collection operations" do Mongoid::Collections::Operations::ALL.each do |name| it "defines #{name}" do master.should respond_to(name) end describe "##{name}" do before do collection.expects(name) end it "delegates to the collection" do master.send(name) end end end end end
Version data entries
19 entries across 19 versions & 3 rubygems