Subversion Repositories SmartDukaan

Rev

Rev 30 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
30 ashish 1
#
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
 
20
require 'rubygems'
21
# require at least 1.1.4 to fix a bug with describing Modules
22
gem 'rspec', '>= 1.1.4'
23
require 'spec'
24
 
25
$:.unshift File.join(File.dirname(__FILE__), *%w[.. ext])
26
 
27
# pretend we already loaded fastthread, otherwise the nonblocking_server_spec
28
# will get screwed up
29
# $" << 'fastthread.bundle'
30
 
31
require File.dirname(__FILE__) + '/../lib/thrift'
32
 
33
class 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
39
end
40
 
41
Spec::Runner.configure do |configuration|
42
  configuration.before(:each) do
43
    Thrift.type_checking = true
44
  end
45
end
46
 
47
$:.unshift File.join(File.dirname(__FILE__), *%w[.. debug_proto_test gen-rb])
48
require "srv"
49
require "debug_proto_test_constants"
50
 
51
$:.unshift File.join(File.dirname(__FILE__), *%w[gen-rb])
52
require 'thrift_spec_types'
53
require 'nonblocking_service'
54
 
55
module Fixtures
56
  COMPACT_PROTOCOL_TEST_STRUCT = COMPACT_TEST.dup
57
  COMPACT_PROTOCOL_TEST_STRUCT.a_binary = [0,1,2,3,4,5,6,7,8].pack('c*')
58
  COMPACT_PROTOCOL_TEST_STRUCT.set_byte_map = nil
59
  COMPACT_PROTOCOL_TEST_STRUCT.map_byte_map = nil
60
end