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/client_spec.rb b/lib/rb/spec/client_spec.rb
index 7079b94..f8ffe8a 100644
--- a/lib/rb/spec/client_spec.rb
+++ b/lib/rb/spec/client_spec.rb
@@ -44,7 +44,7 @@
mock_args.should_receive(:write).with(@prot)
@prot.should_receive(:write_message_end)
@prot.should_receive(:trans) do
- mock('trans').tee do |trans|
+ mock('trans').tap do |trans|
trans.should_receive(:flush)
end
end
@@ -77,7 +77,7 @@
@prot.should_receive(:read_message_begin).and_return [nil, Thrift::MessageTypes::EXCEPTION, 0]
@prot.should_receive(:read_message_end)
Thrift::ApplicationException.should_receive(:new).and_return do
- StandardError.new.tee do |mock_exc|
+ StandardError.new.tap do |mock_exc|
mock_exc.should_receive(:read).with(@prot)
end
end