blob: 9d2dd0ff685325bbe86dfec2290b7dd899bc1bf3 [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 Clark3c59aff2008-06-18 01:17:37 +00006# pretend we already loaded fastthread, otherwise the nonblockingserver_spec
7# will get screwed up
8# $" << 'fastthread.bundle'
9
Kevin Clarkd47cd662008-06-18 01:05:17 +000010# turn on deprecation so we can test it
11module Thrift
David Reiss72754e12008-07-25 21:06:03 +000012 # squelch any warnings if we happen to get required twice
13 remove_const(:DEPRECATION) if const_defined? :DEPRECATION
Kevin Clarkd47cd662008-06-18 01:05:17 +000014 DEPRECATION = true
15end
16
Kevin Clark3eca0782008-06-18 00:54:53 +000017require File.dirname(__FILE__) + '/../lib/thrift'
Kevin Clark0ff9e8c2008-06-18 01:05:03 +000018
19class Object
20 # tee is a useful method, so let's let our tests have it
21 def tee(&block)
22 block.call(self)
23 self
24 end
25end
Kevin Clarkc3783f42008-06-18 01:18:14 +000026
27Spec::Runner.configure do |configuration|
28 configuration.before(:each) do
29 Thrift.type_checking = true
30 end
31end