Sha256: 19de1beb3769b83a9119ceb13a0b3e3a0277e4282e539f5402635a4f5395ef80
Contents?: true
Size: 801 Bytes
Versions: 1
Compression:
Stored size: 801 Bytes
Contents
require 'spec_helper' require 'mongo_request_logger' require 'mongo' require 'shared_examples' require 'mongo_request_logger/adapters/mongo' include MongoRequestLogger describe 'MongoRequestLogger::Logger with mongo' do before do connection = Mongo::Connection.new db = connection.db('request_logger_test') db.authenticate('request_logger_test', 'test_password') rescue nil db.drop_collection 'server_log' rescue nil config = { database: 'request_logger_test', collection: 'server_log', capsize: 10 * 1024 * 1024, } @adapter = MongoRequestLogger::Adapters::Mongo.new(config) @file = 'test-log.txt' FileUtils.remove @file, :force => true end after do FileUtils.remove @file, :force => true end include_examples "log" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo_request_logger-0.1.0 | spec/mongo_logger_spec.rb |