Sha256: 8845aa0ce93045549cdf8d2669bd9b3bbcb3329c6ec95fa5cb0492a53dd68d7b

Contents?: true

Size: 553 Bytes

Versions: 119

Compression:

Stored size: 553 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

119 entries across 119 versions & 13 rubygems

Version Path
mongo_mapper-unstable-2010.2.19 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.18 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.17 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.16 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.15 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.12 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.11 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.10 test/functional/test_logger.rb
mongo_mapper-0.7.0 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.9 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.8 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.5 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.4 test/functional/test_logger.rb
novelys_mongo_mapper-0.6.12 test/functional/test_logger.rb
novelys_mongo_mapper-0.6.11 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.3 test/functional/test_logger.rb
novelys_mongo_mapper-0.6.10 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.2 test/functional/test_logger.rb
mongo_mapper-unstable-2010.2.1 test/functional/test_logger.rb
mongo_mapper-unstable-2010.1.31 test/functional/test_logger.rb