Author: Kevin Ballard <kevin@rapleaf.com>
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671985
13f79535-47bb-0310-9956-
ffa450edef68
dir = File.dirname(__FILE__)
stack.find { |frame| frame[0,dir.size] != dir }
end
+ def self.reset_deprecation_warnings
+ CLASS_MAPPING.each { |k,v| v[2] = false }
+ MODULE_MAPPING.each { |k,v| v[2] = false }
+ end
end
module Kernel
context "Backwards compatibility" do
specify "old class names should map to new classes" do
+ Thrift::DeprecationProxy.reset_deprecation_warnings
# use an Array because a Hash will call #hash and trigger deprecation warnings
klasses = [
[:module, :ThriftClient, Thrift::Client],
Thrift.const_set :DEPRECATION, false
end
+ before(:each) do
+ Thrift::DeprecationProxy.reset_deprecation_warnings
+ end
+
def ensure_const_removed(name, &block)
begin
block.call