THRIFT-1645: Replace Object#tee with more conventional Object#tap in specs
Client: rb
Patch: Nathan Beyer
The spec_helper.rb defines an Object#tee method, which is functionally equivalent to Object#tap. Object#tap was added to Ruby 1.9 and to 1.8.7.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1392509 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/processor_spec.rb b/lib/rb/spec/processor_spec.rb
index ef3bc85..989f5cc 100644
--- a/lib/rb/spec/processor_spec.rb
+++ b/lib/rb/spec/processor_spec.rb
@@ -33,7 +33,7 @@
def mock_trans(obj)
obj.should_receive(:trans).ordered.and_return do
- mock("trans").tee do |trans|
+ mock("trans").tap do |trans|
trans.should_receive(:flush).ordered
end
end
@@ -60,7 +60,7 @@
it "should pass args off to the args class" do
args_class = mock("MockArgsClass")
- args = mock("#<MockArgsClass:mock>").tee do |args|
+ args = mock("#<MockArgsClass:mock>").tap do |args|
args.should_receive(:read).with(@prot).ordered
end
args_class.should_receive(:new).and_return args