features/support/test_client.rb in ftpd-0.0.0.pre1 vs features/support/test_client.rb in ftpd-0.0.0.pre2

- old
+ new

@@ -5,15 +5,20 @@ extend Forwardable include FileUtils def initialize(opts = {}) - @temp_dir = Dir.mktmpdir + @temp_dir = Ftpd::TempDir.new @ftp = make_ftp(opts) @templates = TestFileTemplates.new end + def close + @ftp.close + @temp_dir.rm + end + def_delegators :@ftp, :chdir, :connect, :delete, :getbinaryfile, @@ -59,10 +64,10 @@ def local_path(remote_path) temp_path(File.basename(remote_path)) end def temp_path(path) - File.expand_path(path, @temp_dir) + File.expand_path(path, @temp_dir.path) end def make_ftp(opts) tls = opts[:tls] if tls