From 9470ed126abf6eccd33266d558047fe3fc437df1 Mon Sep 17 00:00:00 2001 From: rudyyazdi Date: Sun, 14 Aug 2016 14:36:57 +1000 Subject: [PATCH] cleaned up the contib stuff --- README.rdoc | 6 ++-- test/test_rake_ftp_file.rb | 74 -------------------------------------- 2 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 test/test_rake_ftp_file.rb diff --git a/README.rdoc b/README.rdoc index 09ca18ca5..584542c07 100644 --- a/README.rdoc +++ b/README.rdoc @@ -24,9 +24,9 @@ Rake has the following features: file names and paths. * A library of prepackaged tasks to make building rakefiles easier. For example, - tasks for building tarballs and publishing to FTP or SSH sites. (Formerly - tasks for building RDoc and Gems were included in rake but they're now - available in RDoc and RubyGems respectively.) + tasks for building tarballs. (Formerly + tasks for building RDoc, Gems and publishing to FTP were included in rake but they're now + available in RDoc, RubyGems and respectively.) * Supports parallel execution of tasks. diff --git a/test/test_rake_ftp_file.rb b/test/test_rake_ftp_file.rb deleted file mode 100644 index 5749b8a5e..000000000 --- a/test/test_rake_ftp_file.rb +++ /dev/null @@ -1,74 +0,0 @@ -require File.expand_path('../helper', __FILE__) -require 'date' -require 'time' -require 'rake/contrib/ftptools' - -class FakeDate - def self.today - Date.new(2003, 10, 3) - end - - def self.now - Time.local(2003, 10, 3, 12, 00, 00) - end -end - -class TestRakeFtpFile < Rake::TestCase - - def setup - super - - Rake::FtpFile.class_eval { - @date_class = FakeDate - @time_class = FakeDate - } - end - - def test_general - file = Rake::FtpFile.new( - "here", - "-rw-r--r-- 1 a279376 develop 121770 Mar 6 14:50 wiki.pl") - assert_equal "wiki.pl", file.name - assert_equal "here/wiki.pl", file.path - assert_equal "a279376", file.owner - assert_equal "develop", file.group - assert_equal 0644, file.mode - assert_equal 121_770, file.size - assert_equal Time.mktime(2003, 3, 6, 14, 50, 0, 0), file.time - assert ! file.directory? - assert ! file.symlink? - end - - def test_far_date - file = Rake::FtpFile.new( - ".", - "drwxr-xr-x 3 a279376 develop 4096 Nov 26 2001 vss") - assert_equal Time.mktime(2001, 11, 26, 0, 0, 0, 0), file.time - end - - def test_close_date - file = Rake::FtpFile.new( - ".", - "drwxr-xr-x 3 a279376 develop 4096 Nov 26 15:35 vss") - assert_equal Time.mktime(2002, 11, 26, 15, 35, 0, 0), file.time - end - - def test_directory - file = Rake::FtpFile.new( - ".", - "drwxrwxr-x 9 a279376 develop 4096 Mar 13 14:32 working") - assert file.directory? - assert !file.symlink? - end - - def test_symlink - file = Rake::FtpFile.new( - ".", - "lrwxrwxrwx 1 a279376 develop 64 Mar 26 2002 " + - "xtrac -> /home/a279376/working/ics/development/java/" + - "com/fmr/fwp/ics/xtrac") - assert_equal 'xtrac', file.name - assert file.symlink? - assert !file.directory? - end -end