Sha256: 34d7a1189fa75fc860083a7ed8335a1718b12aa780ca95ea877cf9b6af54ca9e

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe Oboe::Inst::Mongo do
  it 'Stock Mongo should be loaded, defined and ready' do
    defined?(::Mongo).should_not == nil 
    defined?(::Mongo::DB).should_not == nil
    defined?(::Mongo::Cursor).should_not == nil
    defined?(::Mongo::Collection).should_not == nil
  end

  it 'Mongo should have oboe methods defined' do
    Oboe::Inst::Mongo::DB_OPS.each do |m|
      ::Mongo::DB.method_defined?("#{m}_with_oboe").should == true
    end
    Oboe::Inst::Mongo::CURSOR_OPS.each do |m|
      ::Mongo::Cursor.method_defined?("#{m}_with_oboe").should == true
    end
    Oboe::Inst::Mongo::COLL_WRITE_OPS.each do |m|
      ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
    end
    Oboe::Inst::Mongo::COLL_QUERY_OPS.each do |m|
      ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
    end
    Oboe::Inst::Mongo::COLL_INDEX_OPS.each do |m|
      ::Mongo::Collection.method_defined?("#{m}_with_oboe").should == true
    end
    ::Mongo::Collection.method_defined?(:oboe_collect).should == true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
oboe-2.2.6 spec/instrumentation/mongo_spec.rb
oboe-2.2.5 spec/instrumentation/mongo_spec.rb
oboe-2.2.0 spec/instrumentation/mongo_spec.rb
oboe-2.1.4 spec/instrumentation/mongo_spec.rb
oboe-2.1.3 spec/instrumentation/mongo_spec.rb
oboe-2.1.1 spec/instrumentation/mongo_spec.rb