spec/spec_helper.rb in protobuf-2.8.13 vs spec/spec_helper.rb in protobuf-3.0.0.rc1

- old
+ new

@@ -1,17 +1,19 @@ require 'simplecov' SimpleCov.start +require 'timeout' require 'rubygems' require 'bundler' Bundler.setup :default, :development, :test require 'pry' $: << ::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' @@ -28,14 +30,13 @@ c.include(::Sander6::CustomMatchers) 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)' - proto_path = File.expand_path("../support/", __FILE__) - cmd = %Q{protoc --plugin=./bin/protoc-gen-ruby --ruby_out=#{proto_path} -I #{proto_path} #{File.join(proto_path, '**', '*.proto')}} - puts cmd - %x{#{cmd}} + ::Rake::Task['compile:spec'] end end end support_proto_glob = File.expand_path('../support/**/*.pb.rb', __FILE__)