You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/08/25 01:28:06 UTC

svn commit: r988760 - /buildr/trunk/spec/core/transport_spec.rb

Author: boisvert
Date: Tue Aug 24 23:28:06 2010
New Revision: 988760

URL: http://svn.apache.org/viewvc?rev=988760&view=rev
Log:
Fix incorrect expectations in sftp specs

Modified:
    buildr/trunk/spec/core/transport_spec.rb

Modified: buildr/trunk/spec/core/transport_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/transport_spec.rb?rev=988760&r1=988759&r2=988760&view=diff
==============================================================================
--- buildr/trunk/spec/core/transport_spec.rb (original)
+++ buildr/trunk/spec/core/transport_spec.rb Tue Aug 24 23:28:06 2010
@@ -459,14 +459,14 @@ describe URI::SFTP, '#read' do
 
   it 'should read contents of file and return it' do
     file = mock('Net::SFTP::Operations::File')
-    file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content, nil)
+    file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
     @file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
     @uri.read.should eql(@content)
   end
 
   it 'should read contents of file and pass it to block' do
     file = mock('Net::SFTP::Operations::File')
-    file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content, nil)
+    file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
     @file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
     content = ''
     @uri.read do |chunk|