diff --git a/test/rake/test_ftp.rb b/test/rake/test_ftp.rb index 2178eb7886..0346dd71ca 100644 --- a/test/rake/test_ftp.rb +++ b/test/rake/test_ftp.rb @@ -3,17 +3,15 @@ require 'time' require 'test/unit' 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 Rake::TestFtpFile < Test::Unit::TestCase + class FakeDate + def self.today + Date.new(2003,10,3) + end + def self.now + Time.local(2003,10,3,12,00,00) + end + end def setup Rake::FtpFile.class_eval { @date_class = FakeDate; @time_class = FakeDate } diff --git a/test/rake/test_task_manager.rb b/test/rake/test_task_manager.rb index d414e75cf6..94c30d9c82 100644 --- a/test/rake/test_task_manager.rb +++ b/test/rake/test_task_manager.rb @@ -1,11 +1,10 @@ require 'test/unit' require 'rake' -class TaskManager - include Rake::TaskManager -end - class Rake::TestTaskManager < Test::Unit::TestCase + class TaskManager + include Rake::TaskManager + end def setup @tm = TaskManager.new @@ -147,6 +146,8 @@ class Rake::TestTaskManager < Test::Unit::TestCase end class Rake::TestTaskManagerArgumentResolution < Test::Unit::TestCase + TaskManager = Rake::TestTaskManager::TaskManager + def test_good_arg_patterns assert_equal [:t, [], []], task(:t) assert_equal [:t, [], [:x]], task(:t => :x) diff --git a/test/rake/test_tasks.rb b/test/rake/test_tasks.rb index 02aea6ebb9..a042ec4fc2 100644 --- a/test/rake/test_tasks.rb +++ b/test/rake/test_tasks.rb @@ -5,7 +5,7 @@ require_relative 'filecreation' require_relative 'capture_stdout' ###################################################################### -class Rake::TestTask < Test::Unit::TestCase +class Rake::TestTasks < Test::Unit::TestCase include CaptureStdout include Rake