Sha256: 64ee6ff0ad2a805e17964764d1d8e9b10c81b878f55a033f8fcc4c9006c52570
Contents?: true
Size: 1.42 KB
Versions: 29
Compression:
Stored size: 1.42 KB
Contents
$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) $LOAD_PATH.unshift(File.expand_path('../../ext', __FILE__)) $LOAD_PATH.uniq! require 'rubygems' release_ops_path = File.expand_path('../../releaseops/lib', __FILE__) if File.exists?(release_ops_path) require File.join(release_ops_path, 'releaseops') ReleaseOps::SimpleCov.maybe_start end require 'zookeeper' Dir[File.expand_path('../support/**/*.rb', __FILE__)].sort.each { |f| require(f) } if ENV['ZKRB_DEBUG'] Zookeeper.set_debug_level(4) end if ENV['ZKRB_NOLOG'] SpecGlobalLogger.logger.level = ::Logger::FATAL Zookeeper.set_debug_level(0) end RSpec.configure do |config| config.mock_with :rspec [Zookeeper::SpecHelpers, SpecGlobalLogger].each do |mod| config.include(mod) config.extend(mod) end if Zookeeper.spawn_zookeeper? require 'zk-server' config.before(:suite) do SpecGlobalLogger.logger.debug { "Starting zookeeper service" } ZK::Server.run do |c| c.base_dir = File.expand_path('../../.zkserver', __FILE__) c.client_port = Zookeeper.test_port c.force_sync = false c.snap_count = 1_000_000 end end config.after(:suite) do SpecGlobalLogger.logger.debug { "stopping zookeeper service" } ZK::Server.shutdown end end end require 'pp' if RUBY_VERSION == '1.9.3' trap('USR1') do threads = Thread.list.map { |th| th.backtrace } pp threads end end
Version data entries
29 entries across 29 versions & 2 rubygems