1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rake: get rid of name collision.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-10-03 14:54:18 +00:00
parent 746fe8af5a
commit 74b5825136
3 changed files with 14 additions and 15 deletions

View file

@ -3,17 +3,15 @@ require 'time'
require 'test/unit' require 'test/unit'
require 'rake/contrib/ftptools' 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 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 def setup
Rake::FtpFile.class_eval { @date_class = FakeDate; @time_class = FakeDate } Rake::FtpFile.class_eval { @date_class = FakeDate; @time_class = FakeDate }

View file

@ -1,11 +1,10 @@
require 'test/unit' require 'test/unit'
require 'rake' require 'rake'
class TaskManager
include Rake::TaskManager
end
class Rake::TestTaskManager < Test::Unit::TestCase class Rake::TestTaskManager < Test::Unit::TestCase
class TaskManager
include Rake::TaskManager
end
def setup def setup
@tm = TaskManager.new @tm = TaskManager.new
@ -147,6 +146,8 @@ class Rake::TestTaskManager < Test::Unit::TestCase
end end
class Rake::TestTaskManagerArgumentResolution < Test::Unit::TestCase class Rake::TestTaskManagerArgumentResolution < Test::Unit::TestCase
TaskManager = Rake::TestTaskManager::TaskManager
def test_good_arg_patterns def test_good_arg_patterns
assert_equal [:t, [], []], task(:t) assert_equal [:t, [], []], task(:t)
assert_equal [:t, [], [:x]], task(:t => :x) assert_equal [:t, [], [:x]], task(:t => :x)

View file

@ -5,7 +5,7 @@ require_relative 'filecreation'
require_relative 'capture_stdout' require_relative 'capture_stdout'
###################################################################### ######################################################################
class Rake::TestTask < Test::Unit::TestCase class Rake::TestTasks < Test::Unit::TestCase
include CaptureStdout include CaptureStdout
include Rake include Rake