blob: 30b9da7012ed841423492b470a75d6865c322be0 [file] [log] [blame]
Kevin Clark3eca0782008-06-18 00:54:53 +00001require 'rubygems'
Kevin Clark356f8612008-06-18 01:08:05 +00002# require at least 1.1.4 to fix a bug with describing Modules
3gem 'rspec', '>= 1.1.4'
Kevin Clark3eca0782008-06-18 00:54:53 +00004require 'spec'
5
Kevin Clarkc8190172008-07-28 22:16:34 +00006$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
7
Kevin Clark3c59aff2008-06-18 01:17:37 +00008# pretend we already loaded fastthread, otherwise the nonblockingserver_spec
9# will get screwed up
10# $" << 'fastthread.bundle'
11
Kevin Clarkd47cd662008-06-18 01:05:17 +000012# turn on deprecation so we can test it
13module Thrift
David Reiss72754e12008-07-25 21:06:03 +000014 # squelch any warnings if we happen to get required twice
15 remove_const(:DEPRECATION) if const_defined? :DEPRECATION
Kevin Clarkd47cd662008-06-18 01:05:17 +000016 DEPRECATION = true
17end
18
Kevin Clark3eca0782008-06-18 00:54:53 +000019require File.dirname(__FILE__) + '/../lib/thrift'
Kevin Clark0ff9e8c2008-06-18 01:05:03 +000020
21class Object
22 # tee is a useful method, so let's let our tests have it
23 def tee(&block)
24 block.call(self)
25 self
26 end
27end
Kevin Clarkc3783f42008-06-18 01:18:14 +000028
29Spec::Runner.configure do |configuration|
30 configuration.before(:each) do
31 Thrift.type_checking = true
32 end
33end
Bryan Duxburyc0166282009-02-02 00:48:17 +000034
Bryan Duxburyd815c212009-03-19 18:57:43 +000035require "thrift/protocol/compact_protocol"
36require "thrift_native"
37
38require File.dirname(__FILE__) + "/../debug_proto_test/gen-rb/Srv"
39
40module Fixtures
41 COMPACT_PROTOCOL_TEST_STRUCT = CompactProtoTestStruct.new(:a_binary => [0,1,2,3,4,5,6,7,8].pack('c*'))
42end