Sha256: 7955bbb589451038b5745529c2c3a1cf9e7a1f1d6f7deb90e099bfc6a1f94213
Contents?: true
Size: 1023 Bytes
Versions: 9
Compression:
Stored size: 1023 Bytes
Contents
require 'pione/test-helper' require_relative 'location-behavior' describe 'Location::FTPLocation' do before do Util::FTPServer.start(Util::FTPOnMemoryFS.new) Util::FTPServer.fs.clear @file = Util::FTPServer.make_location(Temppath.create) @dir = Util::FTPServer.make_location(Temppath.create) (@dir + "A").create("A") (@dir + "B").create("B") (@dir + "C").create("C") (@dir + "D" + "X").create("X") (@dir + "D" + "Y").create("Y") (@dir + "D" + "Z").create("Z") end after do @file.delete @dir.delete Util::FTPServer.stop end behaves_like "location" it "should get ftp location from myftp scheme URI" do location = Location[URI.parse("myftp://abc:123@myself/output/")] location.scheme.should == "ftp" end it "should move file in the ftp server" do location = Util::FTPServer.make_location(Temppath.create) (@dir + "A").move(location) location.should.exist location.read.should == "A" (@dir + "A").should.not.exist end end
Version data entries
9 entries across 9 versions & 1 rubygems