2008-06-18 00:54:53 +00:00
|
|
|
require 'rubygems'
|
2008-06-18 01:08:05 +00:00
|
|
|
# require at least 1.1.4 to fix a bug with describing Modules
|
|
|
|
gem 'rspec', '>= 1.1.4'
|
2008-06-18 00:54:53 +00:00
|
|
|
require 'spec'
|
|
|
|
|
2008-07-28 22:16:34 +00:00
|
|
|
$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
|
|
|
|
|
2008-06-18 01:17:37 +00:00
|
|
|
# pretend we already loaded fastthread, otherwise the nonblockingserver_spec
|
|
|
|
# will get screwed up
|
|
|
|
# $" << 'fastthread.bundle'
|
|
|
|
|
2008-06-18 01:05:17 +00:00
|
|
|
# turn on deprecation so we can test it
|
|
|
|
module Thrift
|
2008-07-25 21:06:03 +00:00
|
|
|
# squelch any warnings if we happen to get required twice
|
|
|
|
remove_const(:DEPRECATION) if const_defined? :DEPRECATION
|
2008-06-18 01:05:17 +00:00
|
|
|
DEPRECATION = true
|
|
|
|
end
|
|
|
|
|
2008-06-18 00:54:53 +00:00
|
|
|
require File.dirname(__FILE__) + '/../lib/thrift'
|
2008-06-18 01:05:03 +00:00
|
|
|
|
|
|
|
class Object
|
|
|
|
# tee is a useful method, so let's let our tests have it
|
|
|
|
def tee(&block)
|
|
|
|
block.call(self)
|
|
|
|
self
|
|
|
|
end
|
|
|
|
end
|
2008-06-18 01:18:14 +00:00
|
|
|
|
|
|
|
Spec::Runner.configure do |configuration|
|
|
|
|
configuration.before(:each) do
|
|
|
|
Thrift.type_checking = true
|
|
|
|
end
|
|
|
|
end
|