blob: ccb1adf1d975064cc30b8acf44cda139d1ce9894 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
Kevin Clark3eca0782008-06-18 00:54:53 +000020require 'rubygems'
21require 'spec'
22
Kevin Clarkc8190172008-07-28 22:16:34 +000023$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
24
Bryan Duxburyd1d15422009-04-04 00:58:03 +000025# pretend we already loaded fastthread, otherwise the nonblocking_server_spec
Kevin Clark3c59aff2008-06-18 01:17:37 +000026# will get screwed up
27# $" << 'fastthread.bundle'
28
Kevin Clark3eca0782008-06-18 00:54:53 +000029require File.dirname(__FILE__) + '/../lib/thrift'
Kevin Clark0ff9e8c2008-06-18 01:05:03 +000030
31class Object
32 # tee is a useful method, so let's let our tests have it
33 def tee(&block)
34 block.call(self)
35 self
36 end
37end
Kevin Clarkc3783f42008-06-18 01:18:14 +000038
39Spec::Runner.configure do |configuration|
40 configuration.before(:each) do
41 Thrift.type_checking = true
42 end
43end
Bryan Duxburyc0166282009-02-02 00:48:17 +000044
Jake Farrell9c39f772011-08-30 19:12:10 +000045$:.unshift File.join(File.dirname(__FILE__), *%w[.. test debug_proto gen-rb])
Bryan Duxbury1deddc72009-05-29 20:11:27 +000046require "srv"
47require "debug_proto_test_constants"
48
49$:.unshift File.join(File.dirname(__FILE__), *%w[gen-rb])
50require 'thrift_spec_types'
51require 'nonblocking_service'
Bryan Duxburyd815c212009-03-19 18:57:43 +000052
53module Fixtures
Bryan Duxbury9e4c0412009-04-07 23:45:15 +000054 COMPACT_PROTOCOL_TEST_STRUCT = COMPACT_TEST.dup
55 COMPACT_PROTOCOL_TEST_STRUCT.a_binary = [0,1,2,3,4,5,6,7,8].pack('c*')
Bryan Duxbury5b8b4842009-04-01 20:10:15 +000056 COMPACT_PROTOCOL_TEST_STRUCT.set_byte_map = nil
57 COMPACT_PROTOCOL_TEST_STRUCT.map_byte_map = nil
Roger Meier062de1b2011-03-04 13:10:58 +000058end