Sha256: 7a145b72e6e62facaff6acb51e3ae37c8f8d424f8380021816286f122bc94371

Contents?: true

Size: 1.26 KB

Versions: 13

Compression:

Stored size: 1.26 KB

Contents

require 'timeout'
require 'rubygems'
require 'bundler'
Bundler.setup :default, :development, :test
require 'pry'

$LOAD_PATH << ::File.expand_path('../..', __FILE__)
$LOAD_PATH << ::File.expand_path('../support', __FILE__)

require 'protobuf'
require 'protobuf/rpc/server'
require ::File.expand_path('../support/all', __FILE__)

$LOAD_PATH << ::File.expand_path("../../lib/protobuf/descriptors", __FILE__)
require 'google/protobuf/compiler/plugin.pb'

# Including a way to turn on debug logger for spec runs
if ENV.key?('DEBUG')
  debug_log = ::File.expand_path('../../debug_specs.log', __FILE__)
  ::Protobuf::Logging.initialize_logger(debug_log, ::Logger::DEBUG)
else
  ::Protobuf::Logging.initialize_logger('/dev/null')
end

# Get rid of the deprecation env var if present (messes with specs).
ENV.delete("PB_IGNORE_DEPRECATIONS")

support_proto_glob = File.expand_path('../support/**/*.pb.rb', __FILE__)
Dir[support_proto_glob].each { |proto_file| require proto_file }

RSpec.configure(&:disable_monkey_patching!)

::Protobuf::Rpc::Client.class_eval do
  def ==(other)
    connector.options == other.options && \
      success_cb == other.success_cb && \
      failure_cb == other.failure_cb
  end
end

def reset_service_location(service)
  service.host = nil
  service.port = nil
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
protobuf-3.5.5 spec/spec_helper.rb
protobuf-3.5.4 spec/spec_helper.rb
protobuf-3.5.3 spec/spec_helper.rb
protobuf-3.5.2 spec/spec_helper.rb
protobuf-3.5.1 spec/spec_helper.rb
prepor-protobuf-3.5.1 spec/spec_helper.rb
prepor-protobuf-3.5.0 spec/spec_helper.rb
protobuf-3.5.0 spec/spec_helper.rb
protobuf-3.4.4 spec/spec_helper.rb
protobuf-3.4.3 spec/spec_helper.rb
protobuf-3.4.2 spec/spec_helper.rb
protobuf-3.4.1 spec/spec_helper.rb
protobuf-3.4.0 spec/spec_helper.rb