Author: kclark
Date: Tue Jun 17 17:58:04 2008
New Revision: 668916

URL: http://svn.apache.org/viewvc?rev=668916&view=rev
Log:
Add another spec for deprecate!

Modified:
    incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb

Modified: incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb?rev=668916&r1=668915&r2=668916&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb (original)
+++ incubator/thrift/trunk/lib/rb/spec/deprecation_spec.rb Tue Jun 17 17:58:04 
2008
@@ -151,6 +151,18 @@
     stub_stderr("#{klass.inspect}#old")
     klass.new.old.should == "new 2"
   end
+
+  it "should call the forwarded method in the same context as the original" do
+    klass = Class.new do
+      def myself
+        self
+      end
+      deprecate! :me => :myself
+    end
+    inst = klass.new
+    stub_stderr("#{klass.inspect}#me")
+    inst.me.should eql(inst.myself)
+  end
 end
 
 describe "deprecate_class!" do


Reply via email to