Sha256: 05ab74a6d3707ad06d760ec47747b9decc1c83a0db180ffd79c92fc692972127
Contents?: true
Size: 749 Bytes
Versions: 9
Compression:
Stored size: 749 Bytes
Contents
require 'mongo-db-utils/models/config' require 'mongo-db-utils/console' require 'highline/string_extensions' require 'yaml' describe MongoDbUtils::ConfigProxy do class MockWriter attr_accessor :instance def save(instance) @instance = instance end def flush end end before(:each) do config = MongoDbUtils::Model::Config.new config.writer = MockWriter.new @config = MongoDbUtils::ConfigProxy.new(config) end it "should add a single db" do db = HighLine::String.new("mongodb://localhost:27017/db ") @config.add_single_db(db) @config.dbs.length.should == 1 @config.dbs[0].uri.should == "mongodb://localhost:27017/db" @config.dbs[0].uri.class.to_s.should == "String" end end
Version data entries
9 entries across 9 versions & 1 rubygems