spec/sftp_spec.rb in carrierwave-ftp-0.2.1 vs spec/sftp_spec.rb in carrierwave-ftp-0.2.2

- old
+ new

@@ -18,11 +18,11 @@ :port => 22 } end @file = CarrierWave::SanitizedFile.new(file_path('test.jpg')) - SftpUploader.stub!(:store_path).and_return('uploads/test.jpg') + SftpUploader.stub(:store_path).and_return('uploads/test.jpg') @storage = CarrierWave::Storage::SFTP.new(SftpUploader) end it "opens/closes an ftp connection to the given host" do sftp = double(:sftp_connection) @@ -80,11 +80,10 @@ @stored.should_receive(:size).and_return(10) @stored.exists?.should == true end it "returns the size of the file" do - @sftp.should_receive(:stat!).with('/home/test_user/public_html/uploads/test.jpg') - .and_return(Struct.new(:size).new(14)) + @sftp.should_receive(:stat!).with('/home/test_user/public_html/uploads/test.jpg').and_return(Struct.new(:size).new(14)) @stored.size.should == 14 end it "returns the content of the file" do @stored.should_receive(:file).and_return(Struct.new(:body).new('some content'))