Sha256: 6b26391c9629fe3f3ba02cc7088fd64b5395e7bfb29312e020aad1bec3437b08

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

require 'spec_helper'

module MongoModel
  specs_for(Document, EmbeddedDocument) do
    describe "logging" do
      define_class(:TestDocument, described_class)
      
      let(:logger) { double('logger').as_null_object }
      before(:each) { MongoModel.logger = logger }
      
      it "has a logger reader on the class" do
        TestDocument.logger.should == logger
      end
      
      it "has a logger reader on the instance" do
        TestDocument.new.logger.should == logger
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongomodel-0.5.5 spec/mongomodel/concerns/logging_spec.rb
mongomodel-0.5.4 spec/mongomodel/concerns/logging_spec.rb
mongomodel-0.5.3 spec/mongomodel/concerns/logging_spec.rb
mongomodel-0.5.2 spec/mongomodel/concerns/logging_spec.rb
mongomodel-0.5.1 spec/mongomodel/concerns/logging_spec.rb
mongomodel-0.5.0 spec/mongomodel/concerns/logging_spec.rb