summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_directory_task.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
commitc4ee0df8ba2cf7cc6aaa785c8df20a91b1719021 (patch)
tree06beca468cce4a75a3e9890d18aa001ef2c41e54 /test/rake/test_rake_directory_task.rb
parent8c0b2a286080609613b6b007e030ff7c7adaa23c (diff)
* lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto. * tool/rbinstall.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_directory_task.rb')
-rw-r--r--test/rake/test_rake_directory_task.rb76
1 files changed, 0 insertions, 76 deletions
diff --git a/test/rake/test_rake_directory_task.rb b/test/rake/test_rake_directory_task.rb
deleted file mode 100644
index 0014d1c1583..00000000000
--- a/test/rake/test_rake_directory_task.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-require File.expand_path('../helper', __FILE__)
-require 'fileutils'
-require 'pathname'
-
-class TestRakeDirectoryTask < Rake::TestCase
- include Rake
-
- def test_directory
- desc "DESC"
-
- directory "a/b/c"
-
- assert_equal FileCreationTask, Task["a"].class
- assert_equal FileCreationTask, Task["a/b"].class
- assert_equal FileCreationTask, Task["a/b/c"].class
-
- assert_nil Task["a"].comment
- assert_nil Task["a/b"].comment
- assert_equal "DESC", Task["a/b/c"].comment
-
- verbose(false) {
- Task['a/b'].invoke
- }
-
- assert File.exist?("a/b")
- refute File.exist?("a/b/c")
- end
-
- def test_directory_colon
- directory "a:b"
-
- assert_equal FileCreationTask, Task['a:b'].class
- end unless Rake::Win32.windows?
-
- if Rake::Win32.windows?
- def test_directory_win32
- desc "WIN32 DESC"
- directory 'c:/a/b/c'
- assert_equal FileTask, Task['c:'].class
- assert_equal FileCreationTask, Task['c:/a'].class
- assert_equal FileCreationTask, Task['c:/a/b'].class
- assert_equal FileCreationTask, Task['c:/a/b/c'].class
- assert_nil Task['c:/'].comment
- assert_equal "WIN32 DESC", Task['c:/a/b/c'].comment
- assert_nil Task['c:/a/b'].comment
- end
- end
-
- def test_can_use_blocks
- runlist = []
-
- t1 = directory("a/b/c" => :t2) { |t| runlist << t.name }
- task(:t2) { |t| runlist << t.name }
-
- verbose(false) {
- t1.invoke
- }
-
- assert_equal Task["a/b/c"], t1
- assert_equal FileCreationTask, Task["a/b/c"].class
- assert_equal ["t2", "a/b/c"], runlist
- assert File.directory?("a/b/c")
- end
-
- def test_can_use_pathname
- directory Pathname.new "a/b/c"
-
- assert_equal FileCreationTask, Task["a/b/c"].class
-
- verbose(false) {
- Task['a/b/c'].invoke
- }
-
- assert File.directory?("a/b/c")
- end
-end