Sha256: 0e36ac34e3193abc621c05f88b39db5a0ee5d341d43e933b58d6d1383962df79

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

require 'rspec'
require 'mongodb/graphite/agent/collection_size_calculator'
require 'mongo'

describe 'Collection size calculator' do
  it 'should calculate the number of documents in all db collections' do
    connection = Mongo::MongoClient.new()
    connection["test"]["lol"].save({ asd: 1})
    collection_size_calculator = Mongodb::Graphite::Agent::CollectionSizeCalculator.new(connection)
    collection_size_calculator.calculate.should have_at_least(1).items
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongodb-graphite-agent-0.1.4 spec/collection_size_calculator_spec.rb