spec/paperclip/storage/ftp_spec.rb in paperclip-storage-ftp-1.2.6 vs spec/paperclip/storage/ftp_spec.rb in paperclip-storage-ftp-1.2.7

- old
+ new

@@ -98,13 +98,16 @@ attachment.instance_variable_set(:@queued_for_write, { :original => original_file, :thumb => thumb_file }) - first_server.should_receive(:put_file).with("/tmp/original/foo.jpg", "/files/original/foo.jpg") - first_server.should_receive(:put_file).with("/tmp/thumb/foo.jpg", "/files/thumb/foo.jpg") - second_server.should_receive(:put_file).with("/tmp/original/foo.jpg", "/files/original/foo.jpg") - second_server.should_receive(:put_file).with("/tmp/thumb/foo.jpg", "/files/thumb/foo.jpg") + write_queue = { + "/tmp/original/foo.jpg" => "/files/original/foo.jpg", + "/tmp/thumb/foo.jpg" => "/files/thumb/foo.jpg" + } + + first_server.should_receive(:put_files).with(write_queue) + second_server.should_receive(:put_files).with(write_queue) attachment.should_receive(:with_ftp_servers).and_yield([first_server, second_server]) attachment.should_receive(:after_flush_writes).with(no_args)