Sha256: ebfd8e396ac3a10ee03e13a5350a63128bf11ec4c9ec0d7353fae7dc67c3eb13
Contents?: true
Size: 1.52 KB
Versions: 6
Compression:
Stored size: 1.52 KB
Contents
require 'timeout' require 'rubygems' require 'bundler' Bundler.setup :default, :development, :test require 'pry' # require 'rspec/its' $: << ::File.expand_path('../..', __FILE__) $: << ::File.expand_path('../support', __FILE__) require 'protobuf' require 'protobuf/rpc/server' require ::File.expand_path('../support/all', __FILE__) $: << ::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") ::RSpec.configure do |c| c.mock_with :rspec c.before(:suite) do unless ENV['NO_COMPILE_TEST_PROTOS'] require 'rake' load ::File.expand_path('../../Rakefile', __FILE__) $stdout.puts 'Compiling test protos (use NO_COMPILE_TEST_PROTOS=1 to skip)' ::Rake::Task['compile:spec'] end end end support_proto_glob = File.expand_path('../support/**/*.pb.rb', __FILE__) Dir[support_proto_glob].each { |proto_file| require proto_file } class ::Protobuf::Rpc::Client 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
6 entries across 6 versions & 1 rubygems