Sha256: 82415c2cd6792a99bb5526d3ec51db85a0082ae3c00c492451caeba3b6f9a558

Contents?: true

Size: 446 Bytes

Versions: 6

Compression:

Stored size: 446 Bytes

Contents

require "spec_helper"

describe Mongoid::Publishable::CallbackCollection do
  let(:callback) { mock("callback") }
  let(:contents) { [callback] }
  subject { Mongoid::Publishable::CallbackCollection.new(contents) }

  describe "#process" do
    it "should call #process on each of it's items" do
      object = mock("instance")
      callback.should_receive(:process).with(object).and_return(true)
      subject.process(object)
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid-publishable-0.4.0 spec/mongoid/publishable/callback_collection_spec.rb
mongoid-publishable-0.3.2 spec/mongoid/publishable/callback_collection_spec.rb
mongoid-publishable-0.3.1 spec/mongoid/publishable/callback_collection_spec.rb
mongoid-publishable-0.2.1 spec/mongoid/publishable/callback_collection_spec.rb
mongoid-publishable-0.2.0 spec/mongoid/publishable/callback_collection_spec.rb
mongoid-publishable-0.1.0 spec/mongoid/publishable/callback_collection_spec.rb