Sha256: 6f2aa27a2a268669cb40110904bddb16fe7c8d6e08af49aa4870a03bcac88c68

Contents?: true

Size: 549 Bytes

Versions: 72

Compression:

Stored size: 549 Bytes

Contents

require 'test_helper'

class LoggerTest < Test::Unit::TestCase
  context "with connection that has logger" do
    setup do
      @output = StringIO.new
      @logger = Logger.new(@output)
      MongoMapper.connection = Mongo::Connection.new('127.0.0.1', 27017, :logger => @logger)
    end

    should "be able to get access to that logger" do
      MongoMapper.logger.should == @logger
    end

    should "be able to log messages" do
      MongoMapper.logger.debug 'testing'
      @output.string.include?('testing').should be_true
    end
  end
end

Version data entries

72 entries across 72 versions & 10 rubygems

Version Path
mongo_mapper-0.12.0 test/functional/test_logger.rb
lookout-mongo_mapper-0.11.3 test/functional/test_logger.rb
mongo_mapper-0.11.2 test/functional/test_logger.rb
jamieorc-mongo_mapper-0.11.1.1 test/functional/test_logger.rb
mongo_mapper-0.11.1 test/functional/test_logger.rb
mongo_mapper-0.11.0 test/functional/test_logger.rb
mongo_mapper-0.10.1 test/functional/test_logger.rb
mongo_mapper-0.10.0 test/functional/test_logger.rb
mongo_mapper-0.9.2 test/functional/test_logger.rb
jonbell-mongo_mapper-0.8.6 test/functional/test_logger.rb
mongo_mapper-0.9.1 test/functional/test_logger.rb
mongo_mapper-0.9.0 test/functional/test_logger.rb
ign-mongo_mapper-0.8.6.2 test/functional/test_logger.rb
ign-mongo_mapper-0.8.6.1 test/functional/test_logger.rb
ssherman-mongo_mapper-0.8.6 test/functional/test_logger.rb
mongo_mapper-0.8.6 test/functional/test_logger.rb
mongo_mapper-0.8.5 test/functional/test_logger.rb
honkster-mongo_mapper-0.8.4 test/functional/test_logger.rb
mongo_mapper-0.8.4 test/functional/test_logger.rb
mongo_mapper-unstable-2010.08.19 test/functional/test_logger.rb