From 1deddc799a177ac07acbad90ccd6df655876f85d Mon Sep 17 00:00:00 2001 From: Bryan Duxbury Date: Fri, 29 May 2009 20:11:27 +0000 Subject: [PATCH] THRIFT-513. rb: spec test files broken, rake searching for misnamed files This patch causes the right files to be required and cleans up a few odd or redundant requires that were in the specs. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@780090 13f79535-47bb-0310-9956-ffa450edef68 --- lib/rb/spec/binary_protocol_accelerated_spec.rb | 1 - lib/rb/spec/nonblocking_server_spec.rb | 1 - lib/rb/spec/serializer_spec.rb | 1 - lib/rb/spec/spec_helper.rb | 9 +++++++-- lib/rb/spec/struct_spec.rb | 1 - lib/rb/spec/types_spec.rb | 1 - 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/rb/spec/binary_protocol_accelerated_spec.rb b/lib/rb/spec/binary_protocol_accelerated_spec.rb index 0306cf5f..48c22e48 100644 --- a/lib/rb/spec/binary_protocol_accelerated_spec.rb +++ b/lib/rb/spec/binary_protocol_accelerated_spec.rb @@ -19,7 +19,6 @@ require File.dirname(__FILE__) + '/spec_helper' require File.dirname(__FILE__) + '/binary_protocol_spec_shared' -require File.dirname(__FILE__) + '/gen-rb/thrift_spec_types' class ThriftBinaryProtocolAcceleratedSpec < Spec::ExampleGroup include Thrift diff --git a/lib/rb/spec/nonblocking_server_spec.rb b/lib/rb/spec/nonblocking_server_spec.rb index a0e86cf2..ead51d78 100644 --- a/lib/rb/spec/nonblocking_server_spec.rb +++ b/lib/rb/spec/nonblocking_server_spec.rb @@ -18,7 +18,6 @@ # require File.dirname(__FILE__) + '/spec_helper' -require File.dirname(__FILE__) + '/gen-rb/nonblocking_service' class ThriftNonblockingServerSpec < Spec::ExampleGroup include Thrift diff --git a/lib/rb/spec/serializer_spec.rb b/lib/rb/spec/serializer_spec.rb index 82f374b1..44339c0b 100644 --- a/lib/rb/spec/serializer_spec.rb +++ b/lib/rb/spec/serializer_spec.rb @@ -18,7 +18,6 @@ # require File.dirname(__FILE__) + '/spec_helper' -require File.dirname(__FILE__) + '/gen-rb/thrift_spec_types' class ThriftSerializerSpec < Spec::ExampleGroup include Thrift diff --git a/lib/rb/spec/spec_helper.rb b/lib/rb/spec/spec_helper.rb index 3c20bf99..eb5d29cb 100644 --- a/lib/rb/spec/spec_helper.rb +++ b/lib/rb/spec/spec_helper.rb @@ -44,8 +44,13 @@ Spec::Runner.configure do |configuration| end end -require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/Srv" -require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/debug_proto_test_constants" +$:.unshift File.join(File.dirname(__FILE__), *%w[.. debug_proto_test gen-rb]) +require "srv" +require "debug_proto_test_constants" + +$:.unshift File.join(File.dirname(__FILE__), *%w[gen-rb]) +require 'thrift_spec_types' +require 'nonblocking_service' module Fixtures COMPACT_PROTOCOL_TEST_STRUCT = COMPACT_TEST.dup diff --git a/lib/rb/spec/struct_spec.rb b/lib/rb/spec/struct_spec.rb index 23a701ec..237f9829 100644 --- a/lib/rb/spec/struct_spec.rb +++ b/lib/rb/spec/struct_spec.rb @@ -18,7 +18,6 @@ # require File.dirname(__FILE__) + '/spec_helper' -require File.dirname(__FILE__) + '/gen-rb/thrift_spec_types' class ThriftStructSpec < Spec::ExampleGroup include Thrift diff --git a/lib/rb/spec/types_spec.rb b/lib/rb/spec/types_spec.rb index d979cfb1..7999e92a 100644 --- a/lib/rb/spec/types_spec.rb +++ b/lib/rb/spec/types_spec.rb @@ -18,7 +18,6 @@ # require File.dirname(__FILE__) + '/spec_helper' -require File.dirname(__FILE__) + '/gen-rb/thrift_spec_types' class ThriftTypesSpec < Spec::ExampleGroup include Thrift -- 2.17.1