Add another spec for deprecate!


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668916 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/deprecation_spec.rb b/lib/rb/spec/deprecation_spec.rb
index 08e1504..bec299c 100644
--- a/lib/rb/spec/deprecation_spec.rb
+++ b/lib/rb/spec/deprecation_spec.rb
@@ -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