blob: 41bf631e7ae32a5d2eb9b9da023157bd011d5f26 [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'
Kevin Clark356f8612008-06-18 01:08:05 +000021# require at least 1.1.4 to fix a bug with describing Modules
22gem 'rspec', '>= 1.1.4'
Kevin Clark3eca0782008-06-18 00:54:53 +000023require 'spec'
24
Kevin Clarkc8190172008-07-28 22:16:34 +000025$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
26
Bryan Duxburyd1d15422009-04-04 00:58:03 +000027# pretend we already loaded fastthread, otherwise the nonblocking_server_spec
Kevin Clark3c59aff2008-06-18 01:17:37 +000028# will get screwed up
29# $" << 'fastthread.bundle'
30
Kevin Clark3eca0782008-06-18 00:54:53 +000031require File.dirname(__FILE__) + '/../lib/thrift'
Kevin Clark0ff9e8c2008-06-18 01:05:03 +000032
33class Object
34 # tee is a useful method, so let's let our tests have it
35 def tee(&block)
36 block.call(self)
37 self
38 end
39end
Kevin Clarkc3783f42008-06-18 01:18:14 +000040
41Spec::Runner.configure do |configuration|
42 configuration.before(:each) do
43 Thrift.type_checking = true
44 end
45end
Bryan Duxburyc0166282009-02-02 00:48:17 +000046
Bryan Duxburyd815c212009-03-19 18:57:43 +000047require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/Srv"
48
49module Fixtures
50 COMPACT_PROTOCOL_TEST_STRUCT = CompactProtoTestStruct.new(:a_binary => [0,1,2,3,4,5,6,7,8].pack('c*'))
Bryan Duxbury5b8b4842009-04-01 20:10:15 +000051 COMPACT_PROTOCOL_TEST_STRUCT.set_byte_map = nil
52 COMPACT_PROTOCOL_TEST_STRUCT.map_byte_map = nil
Bryan Duxburyd815c212009-03-19 18:57:43 +000053end