19 lines
491 B
Ruby
19 lines
491 B
Ruby
require 'core/devops-application'
|
|
|
|
module SpecSupport
|
|
BLANK_FILE = File.join(Devops::Application.root, 'spec/support/blank_file')
|
|
TEST_DB = 'devops_test'
|
|
|
|
def stub_loggers
|
|
allow(DevopsLogger).to receive_message_chain('logger.debug')
|
|
allow(DevopsLogger).to receive_message_chain('logger.info')
|
|
allow(DevopsLogger).to receive_message_chain('logger.error')
|
|
end
|
|
|
|
def self.db
|
|
@db ||= begin
|
|
require 'mongo'
|
|
Mongo::MongoClient.new.db(TEST_DB)
|
|
end
|
|
end
|
|
end |