Sha256: 6a537512fd4a02128bec673cd55e9b8c5ab6f576de42618f46417015039aaead
Contents?: true
Size: 757 Bytes
Versions: 21
Compression:
Stored size: 757 Bytes
Contents
require 'insulin' describe Insulin::MongoHandle do conf = Insulin::Config.new 'conf/insulin_dev.yaml' mconf = conf.get_section "mongo" handle = Insulin::MongoHandle.new mconf it "should make a connection to mongo" do handle.connection.database_names.size.should >= 1 end it "should have a database" do handle.db.name.should == mconf["database"] end it "should drop the database" do handle.drop_db handle.connection.database_names.include?(mconf["database"]).should_not == true end it "should respond correctly to being passed a hash" do prod_handle = Insulin::MongoHandle.new( { "database" => "prawn" } ) prod_handle.db.name.should == "prawn" prod_handle.drop_db end end
Version data entries
21 entries across 21 versions & 1 rubygems