drake 0.8.7.0.2.4 → 0.9.0.0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.gemtest +0 -0
  2. data/CHANGES +77 -9
  3. data/{CHANGES.drake → CHANGES-drake} +6 -2
  4. data/MIT-LICENSE +2 -0
  5. data/{README → README.rdoc} +30 -18
  6. data/Rakefile +144 -130
  7. data/Rakefile-drake +67 -0
  8. data/TODO +1 -1
  9. data/bin/drake +2 -0
  10. data/doc/command_line_usage.rdoc +25 -11
  11. data/doc/glossary.rdoc +2 -2
  12. data/doc/jamis.rb +2 -2
  13. data/doc/parallel.rdoc +37 -29
  14. data/doc/proto_rake.rdoc +22 -22
  15. data/doc/rake.1.gz +0 -0
  16. data/doc/rakefile.rdoc +56 -33
  17. data/doc/rational.rdoc +6 -6
  18. data/doc/release_notes/rake-0.4.15.rdoc +1 -1
  19. data/doc/release_notes/rake-0.5.0.rdoc +1 -1
  20. data/doc/release_notes/rake-0.7.0.rdoc +1 -1
  21. data/doc/release_notes/rake-0.7.2.rdoc +3 -3
  22. data/doc/release_notes/rake-0.7.3.rdoc +2 -2
  23. data/doc/release_notes/rake-0.8.0.rdoc +1 -1
  24. data/doc/release_notes/rake-0.8.2.rdoc +3 -3
  25. data/doc/release_notes/rake-0.8.3.rdoc +2 -2
  26. data/doc/release_notes/rake-0.8.4.rdoc +1 -1
  27. data/doc/release_notes/rake-0.8.5.rdoc +1 -1
  28. data/doc/release_notes/rake-0.8.6.rdoc +1 -1
  29. data/doc/release_notes/rake-0.8.7.rdoc +1 -1
  30. data/doc/release_notes/rake-0.9.0.rdoc +112 -0
  31. data/install.rb +14 -12
  32. data/lib/rake.rb +31 -2527
  33. data/lib/rake/alt_system.rb +7 -6
  34. data/lib/rake/application.rb +626 -0
  35. data/lib/rake/classic_namespace.rb +1 -0
  36. data/lib/rake/clean.rb +2 -4
  37. data/lib/rake/cloneable.rb +25 -0
  38. data/lib/rake/contrib/compositepublisher.rb +2 -5
  39. data/lib/rake/contrib/ftptools.rb +5 -8
  40. data/lib/rake/contrib/publisher.rb +2 -8
  41. data/lib/rake/contrib/rubyforgepublisher.rb +2 -4
  42. data/lib/rake/contrib/sshpublisher.rb +4 -6
  43. data/lib/rake/contrib/sys.rb +7 -25
  44. data/lib/rake/default_loader.rb +10 -0
  45. data/lib/rake/dsl.rb +2 -0
  46. data/lib/rake/dsl_definition.rb +143 -0
  47. data/lib/rake/early_time.rb +18 -0
  48. data/lib/rake/ext/core.rb +27 -0
  49. data/lib/rake/ext/module.rb +39 -0
  50. data/lib/rake/ext/string.rb +167 -0
  51. data/lib/rake/ext/time.rb +14 -0
  52. data/lib/rake/file_creation_task.rb +24 -0
  53. data/lib/rake/file_list.rb +403 -0
  54. data/lib/rake/file_task.rb +47 -0
  55. data/lib/rake/file_utils.rb +112 -0
  56. data/lib/rake/file_utils_ext.rb +142 -0
  57. data/lib/rake/gempackagetask.rb +6 -90
  58. data/lib/rake/invocation_chain.rb +51 -0
  59. data/lib/rake/invocation_exception_mixin.rb +16 -0
  60. data/lib/rake/loaders/makefile.rb +13 -15
  61. data/lib/rake/multi_task.rb +16 -0
  62. data/lib/rake/name_space.rb +25 -0
  63. data/lib/rake/packagetask.rb +13 -12
  64. data/lib/rake/parallel.rb +17 -28
  65. data/lib/rake/pathmap.rb +1 -0
  66. data/lib/rake/pseudo_status.rb +24 -0
  67. data/lib/rake/rake_module.rb +29 -0
  68. data/lib/rake/rake_test_loader.rb +10 -2
  69. data/lib/rake/rdoctask.rb +211 -190
  70. data/lib/rake/ruby182_test_unit_fix.rb +9 -7
  71. data/lib/rake/rule_recursion_overflow_error.rb +20 -0
  72. data/lib/rake/runtest.rb +4 -6
  73. data/lib/rake/task.rb +351 -0
  74. data/lib/rake/task_argument_error.rb +7 -0
  75. data/lib/rake/task_arguments.rb +74 -0
  76. data/lib/rake/task_manager.rb +307 -0
  77. data/lib/rake/tasklib.rb +1 -2
  78. data/lib/rake/testtask.rb +57 -27
  79. data/lib/rake/version.rb +13 -0
  80. data/lib/rake/win32.rb +4 -4
  81. data/test/contrib/test_sys.rb +8 -31
  82. data/test/data/access/Rakefile +33 -0
  83. data/test/data/comments/Rakefile +18 -0
  84. data/test/data/default/Rakefile +1 -1
  85. data/test/data/deprecated_import/Rakefile +1 -0
  86. data/test/data/dryrun/Rakefile +1 -1
  87. data/test/data/file_creation_task/Rakefile +1 -1
  88. data/test/data/namespace/Rakefile +9 -0
  89. data/test/data/rakelib/test1.rb +1 -0
  90. data/test/data/verbose/Rakefile +34 -0
  91. data/test/{filecreation.rb → file_creation.rb} +11 -7
  92. data/test/functional/functional_test.rb +25 -0
  93. data/test/{session_functional.rb → functional/session_based_tests.rb} +141 -23
  94. data/test/in_environment.rb +7 -5
  95. data/test/{test_application.rb → lib/application_test.rb} +331 -143
  96. data/test/{test_clean.rb → lib/clean_test.rb} +1 -0
  97. data/test/{test_definitions.rb → lib/definitions_test.rb} +4 -4
  98. data/test/lib/dsl_test.rb +52 -0
  99. data/test/{test_earlytime.rb → lib/earlytime_test.rb} +1 -2
  100. data/test/{test_extension.rb → lib/extension_test.rb} +2 -2
  101. data/test/{test_file_creation_task.rb → lib/file_creation_task_test.rb} +1 -1
  102. data/test/{test_file_task.rb → lib/file_task_test.rb} +9 -5
  103. data/test/{test_filelist.rb → lib/filelist_test.rb} +38 -24
  104. data/test/{test_fileutils.rb → lib/fileutils_test.rb} +27 -22
  105. data/test/{test_ftp.rb → lib/ftp_test.rb} +0 -0
  106. data/test/{test_invocation_chain.rb → lib/invocation_chain_test.rb} +0 -0
  107. data/test/{test_makefile_loader.rb → lib/makefile_loader_test.rb} +0 -0
  108. data/test/{test_multitask.rb → lib/multitask_test.rb} +3 -2
  109. data/test/{test_namespace.rb → lib/namespace_test.rb} +0 -0
  110. data/test/lib/package_task_test.rb +82 -0
  111. data/test/{test_parallel.rb → lib/parallel_test.rb} +5 -5
  112. data/test/{test_pathmap.rb → lib/pathmap_test.rb} +3 -2
  113. data/test/{test_pseudo_status.rb → lib/pseudo_status_test.rb} +0 -0
  114. data/test/{test_rake.rb → lib/rake_test.rb} +1 -1
  115. data/test/{test_rdoc_task.rb → lib/rdoc_task_test.rb} +19 -23
  116. data/test/{test_require.rb → lib/require_test.rb} +8 -2
  117. data/test/{test_rules.rb → lib/rules_test.rb} +4 -5
  118. data/test/{test_task_arguments.rb → lib/task_arguments_test.rb} +5 -5
  119. data/test/{test_task_manager.rb → lib/task_manager_test.rb} +15 -5
  120. data/test/{test_tasks.rb → lib/task_test.rb} +91 -28
  121. data/test/{test_tasklib.rb → lib/tasklib_test.rb} +0 -0
  122. data/test/{test_test_task.rb → lib/test_task_test.rb} +3 -3
  123. data/test/lib/testtask_test.rb +49 -0
  124. data/test/{test_top_level_functions.rb → lib/top_level_functions_test.rb} +5 -3
  125. data/test/{test_win32.rb → lib/win32_test.rb} +19 -0
  126. data/test/rake_test_setup.rb +6 -10
  127. data/test/ruby_version_test.rb +3 -0
  128. data/test/test_helper.rb +19 -0
  129. metadata +108 -66
  130. data/Rakefile.drake +0 -73
  131. data/test/functional.rb +0 -15
  132. data/test/test_package_task.rb +0 -118
File without changes
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test/unit'
4
+ require 'thread'
4
5
  require 'rake'
5
6
 
6
7
  ######################################################################
@@ -9,7 +10,7 @@ class TestMultiTask < Test::Unit::TestCase
9
10
 
10
11
  def setup
11
12
  Task.clear
12
- @runs = SerializedArray.new
13
+ @runs = ThreadSafeArray.new
13
14
  end
14
15
 
15
16
  def test_running_multitasks
@@ -42,4 +43,4 @@ class TestMultiTask < Test::Unit::TestCase
42
43
  end
43
44
  end
44
45
 
45
-
46
+
File without changes
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'test/unit'
4
+ require 'rake/packagetask'
5
+ require 'test/rake_test_setup'
6
+
7
+ class TestPackageTask < Test::Unit::TestCase
8
+ include TestMethods
9
+
10
+ def test_initialize
11
+ pkg = Rake::PackageTask.new("pkgr", "1.2.3") { |p|
12
+ p.package_files << "install.rb"
13
+ p.package_files.include(
14
+ '[A-Z]*',
15
+ 'bin/**/*',
16
+ 'lib/**/*.rb',
17
+ 'test/**/*.rb',
18
+ 'doc/**/*',
19
+ 'build/rubyapp.rb',
20
+ '*.blurb')
21
+ p.package_files.exclude(/\bCVS\b/)
22
+ p.package_files.exclude(/~$/)
23
+ p.package_dir = 'pkg'
24
+ p.need_tar = true
25
+ p.need_tar_gz = true
26
+ p.need_tar_bz2 = true
27
+ p.need_zip = true
28
+ }
29
+
30
+ assert_equal "pkg", pkg.package_dir
31
+ assert pkg.package_files.include?("bin/rake")
32
+ assert_equal 'pkgr', pkg.name
33
+ assert_equal '1.2.3', pkg.version
34
+ assert Rake::Task[:package]
35
+ assert Rake::Task['pkg/pkgr-1.2.3.tgz']
36
+ assert Rake::Task['pkg/pkgr-1.2.3.tar.gz']
37
+ assert Rake::Task['pkg/pkgr-1.2.3.tar.bz2']
38
+ assert Rake::Task['pkg/pkgr-1.2.3.zip']
39
+ assert Rake::Task['pkg/pkgr-1.2.3']
40
+ assert Rake::Task[:clobber_package]
41
+ assert Rake::Task[:repackage]
42
+ end
43
+
44
+ def test_initialize_no_version
45
+ e = assert_raises RuntimeError do
46
+ Rake::PackageTask.new 'pkgr'
47
+ end
48
+
49
+ assert_equal 'Version required (or :noversion)', e.message
50
+ end
51
+
52
+ def test_initialize_noversion
53
+ pkg = Rake::PackageTask.new 'pkgr', :noversion
54
+
55
+ assert_equal 'pkg', pkg.package_dir
56
+ assert_equal 'pkgr', pkg.name
57
+ assert_equal nil, pkg.version
58
+ end
59
+
60
+ def test_clone
61
+ pkg = Rake::PackageTask.new("x", :noversion)
62
+ p2 = pkg.clone
63
+ pkg.package_files << "y"
64
+ p2.package_files << "x"
65
+ assert_equal ["y"], pkg.package_files
66
+ assert_equal ["x"], p2.package_files
67
+ end
68
+
69
+ def test_package_name
70
+ pkg = Rake::PackageTask.new 'a', '1'
71
+
72
+ assert_equal 'a-1', pkg.package_name
73
+ end
74
+
75
+ def test_package_name_noversion
76
+ pkg = Rake::PackageTask.new 'a', :noversion
77
+
78
+ assert_equal 'a', pkg.package_name
79
+ end
80
+
81
+ end
82
+
@@ -4,7 +4,7 @@ require 'test/unit'
4
4
  require 'rake'
5
5
  require 'test/rake_test_setup'
6
6
 
7
- if Rake.application.options.threads > 1
7
+ if Rake.application.options.threads != 1
8
8
  class TestParallel < Test::Unit::TestCase
9
9
  VISUALS = false
10
10
  TIME_STEP = 0.25
@@ -30,7 +30,7 @@ if Rake.application.options.threads > 1
30
30
 
31
31
  data = Hash.new { |hash, key| hash[key] = Hash.new }
32
32
 
33
- (1..MAX_THREADS).each { |threads|
33
+ (0..MAX_THREADS).each { |threads|
34
34
  app = Rake::Application.new
35
35
  app.options.threads = threads
36
36
 
@@ -70,7 +70,7 @@ if Rake.application.options.threads > 1
70
70
  assert_order(1, data[2]["b"])
71
71
  assert_order(2, data[2]["default"])
72
72
 
73
- (3..MAX_THREADS).each { |threads|
73
+ ([0] + (3..MAX_THREADS).to_a).each { |threads|
74
74
  assert_order(0, data[threads]["x"])
75
75
  assert_order(0, data[threads]["y"])
76
76
  assert_order(0, data[threads]["b"])
@@ -96,7 +96,7 @@ if Rake.application.options.threads > 1
96
96
  def test_randomize
97
97
  size = 100
98
98
  [false, true].each do |randomize|
99
- memo = SerializedArray.new
99
+ memo = ThreadSafeArray.new
100
100
  app = Rake::Application.new
101
101
  app.define_task Rake::Task, :root
102
102
  size.times { |n|
@@ -133,7 +133,7 @@ if Rake.application.options.threads > 1
133
133
  acc.merge!(result)
134
134
  }
135
135
 
136
- memo = SerializedArray.new
136
+ memo = ThreadSafeArray.new
137
137
 
138
138
  Rake::MultiTask.module_eval {
139
139
  originals.each_pair { |method_name, method_object|
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test/unit'
4
+ require 'test/rake_test_setup'
4
5
  require 'rake'
5
6
 
6
7
  # ====================================================================
@@ -26,7 +27,7 @@ class TestPathMap < Test::Unit::TestCase
26
27
 
27
28
  def test_n_returns_basename_without_extension
28
29
  assert_equal "abc", "abc.rb".pathmap("%n")
29
- assert_equal "abc", "abc".pathmap("%n")
30
+ assert_equal "abc", "abc".pathmap("%n")
30
31
  assert_equal "abc", "this/is/a/dir/abc.rb".pathmap("%n")
31
32
  assert_equal "abc", "/this/is/a/dir/abc.rb".pathmap("%n")
32
33
  assert_equal "abc", "/this/is/a/dir/abc".pathmap("%n")
@@ -87,7 +88,7 @@ class TestPathMap < Test::Unit::TestCase
87
88
  end
88
89
 
89
90
  def test_undefined_percent_causes_error
90
- ex = assert_exception(ArgumentError) {
91
+ assert_exception(ArgumentError) {
91
92
  "dir/abc.rb".pathmap("%z")
92
93
  }
93
94
  end
@@ -37,5 +37,5 @@ class TestRake < Test::Unit::TestCase
37
37
  def test_original_dir_reports_current_dir
38
38
  assert_equal Dir.pwd, Rake.original_dir
39
39
  end
40
-
40
+
41
41
  end
@@ -1,24 +1,31 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'test/unit'
4
- require 'rake/rdoctask'
4
+ require 'test/capture_stdout'
5
+ begin
6
+ old_verbose = $VERBOSE
7
+ $VERBOSE = nil
8
+ require 'rake/rdoctask'
9
+ ensure
10
+ $VERBOSE = old_verbose
11
+ end
5
12
  require 'test/rake_test_setup'
6
13
 
7
14
  class TestRDocTask < Test::Unit::TestCase
8
15
  include Rake
9
16
  include TestMethods
10
-
17
+
11
18
  def setup
12
19
  Task.clear
13
20
  end
14
-
21
+
15
22
  def test_tasks_creation
16
23
  Rake::RDocTask.new
17
24
  assert Task[:rdoc]
18
25
  assert Task[:clobber_rdoc]
19
26
  assert Task[:rerdoc]
20
27
  end
21
-
28
+
22
29
  def test_tasks_creation_with_custom_name_symbol
23
30
  rd = Rake::RDocTask.new(:rdoc_dev)
24
31
  assert Task[:rdoc_dev]
@@ -26,7 +33,7 @@ class TestRDocTask < Test::Unit::TestCase
26
33
  assert Task[:rerdoc_dev]
27
34
  assert_equal :rdoc_dev, rd.name
28
35
  end
29
-
36
+
30
37
  def test_tasks_creation_with_custom_name_string
31
38
  rd = Rake::RDocTask.new("rdoc_dev")
32
39
  assert Task[:rdoc_dev]
@@ -34,7 +41,7 @@ class TestRDocTask < Test::Unit::TestCase
34
41
  assert Task[:rerdoc_dev]
35
42
  assert_equal "rdoc_dev", rd.name
36
43
  end
37
-
44
+
38
45
  def test_tasks_creation_with_custom_name_hash
39
46
  options = { :rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", :rerdoc => "rdoc:force" }
40
47
  rd = Rake::RDocTask.new(options)
@@ -44,45 +51,34 @@ class TestRDocTask < Test::Unit::TestCase
44
51
  assert_raises(RuntimeError) { Task[:clobber_rdoc] }
45
52
  assert_equal options, rd.name
46
53
  end
47
-
54
+
48
55
  def test_tasks_creation_with_custom_name_hash_will_use_default_if_an_option_isnt_given
49
- rd = Rake::RDocTask.new(:clobber_rdoc => "rdoc:clean")
56
+ Rake::RDocTask.new(:clobber_rdoc => "rdoc:clean")
50
57
  assert Task[:rdoc]
51
58
  assert Task[:"rdoc:clean"]
52
59
  assert Task[:rerdoc]
53
60
  end
54
-
61
+
55
62
  def test_tasks_creation_with_custom_name_hash_raises_exception_if_invalid_option_given
56
63
  assert_raises(ArgumentError) do
57
64
  Rake::RDocTask.new(:foo => "bar")
58
65
  end
59
-
66
+
60
67
  begin
61
68
  Rake::RDocTask.new(:foo => "bar")
62
69
  rescue ArgumentError => e
63
70
  assert_match(/foo/, e.message)
64
71
  end
65
72
  end
66
-
67
- def test_inline_source_is_enabled_by_default
68
- rd = Rake::RDocTask.new
69
- assert rd.option_list.include?('--inline-source')
70
- end
71
-
73
+
72
74
  def test_inline_source_option_is_only_appended_if_option_not_already_given
73
75
  rd = Rake::RDocTask.new
74
76
  rd.options << '--inline-source'
75
77
  assert_equal 1, rd.option_list.grep('--inline-source').size
76
-
78
+
77
79
  rd = Rake::RDocTask.new
78
80
  rd.options << '-S'
79
81
  assert_equal 1, rd.option_list.grep('-S').size
80
82
  assert_equal 0, rd.option_list.grep('--inline-source').size
81
83
  end
82
-
83
- def test_inline_source_option_can_be_disabled
84
- rd = Rake::RDocTask.new
85
- rd.inline_source = false
86
- assert !rd.option_list.include?('--inline-source')
87
- end
88
84
  end
@@ -19,8 +19,13 @@ class TestRequire < Test::Unit::TestCase
19
19
  def test_wont_reload_rake_library
20
20
  app = Rake::Application.new
21
21
  app.options.threads = Rake.application.options.threads
22
+
23
+ paths = ['test/data/rakelib']
24
+ loaded_files = []
25
+ app.rake_require("test2", paths, loaded_files)
26
+
22
27
  assert ! app.instance_eval {
23
- rake_require("test2", ['test/data/rakelib'], ['test2'])
28
+ rake_require("test2", paths, loaded_files)
24
29
  }
25
30
  end
26
31
 
@@ -32,7 +37,8 @@ class TestRequire < Test::Unit::TestCase
32
37
  rake_require("testx", ['test/data/rakelib'], [])
33
38
  }
34
39
  }
35
- assert_match(/x/, ex.message)
40
+ assert_match(/(can *not|can't)\s+find/i, ex.message)
41
+ assert_match(/testx/, ex.message)
36
42
  end
37
43
  end
38
44
 
@@ -3,7 +3,7 @@
3
3
  require 'test/unit'
4
4
  require 'fileutils'
5
5
  require 'rake'
6
- require 'test/filecreation'
6
+ require 'test/file_creation'
7
7
  require 'test/rake_test_setup'
8
8
 
9
9
  ######################################################################
@@ -21,7 +21,7 @@ class TestRules < Test::Unit::TestCase
21
21
 
22
22
  def setup
23
23
  Task.clear
24
- @runs = SerializedArray.new
24
+ @runs = ThreadSafeArray.new
25
25
  end
26
26
 
27
27
  def teardown
@@ -97,7 +97,7 @@ class TestRules < Test::Unit::TestCase
97
97
  assert_equal [OBJFILE], @runs
98
98
  end
99
99
 
100
- def test_file_names_beginning_with_dot_can_be_tricked_into_refering_to_file
100
+ def test_file_names_beginning_with_dot_can_be_tricked_into_referring_to_file
101
101
  verbose(false) do
102
102
  chdir("testdata") do
103
103
  create_file('.foo')
@@ -278,7 +278,6 @@ class TestRules < Test::Unit::TestCase
278
278
  end
279
279
 
280
280
  def test_rule_with_proc_dependent_will_trigger
281
- ran = false
282
281
  mkdir_p("testdata/src/jw")
283
282
  create_file("testdata/src/jw/X.java")
284
283
  rule %r(classes/.*\.class) => [
@@ -317,7 +316,7 @@ class TestRules < Test::Unit::TestCase
317
316
  end
318
317
 
319
318
  def test_recursive_rules_will_work_as_long_as_they_terminate
320
- actions = SerializedArray.new
319
+ actions = ThreadSafeArray.new
321
320
  create_file("testdata/abc.xml")
322
321
  rule '.y' => '.xml' do actions << 'y' end
323
322
  rule '.c' => '.y' do actions << 'c'end
@@ -50,12 +50,12 @@ class TestTaskArguments < Test::Unit::TestCase
50
50
  assert_nil ta.cc
51
51
  end
52
52
 
53
- def test_args_can_reference_env_values
53
+ def test_args_do_not_reference_env_values
54
54
  ta = Rake::TaskArguments.new(["aa"], [1])
55
55
  ENV['rev'] = "1.2"
56
56
  ENV['VER'] = "2.3"
57
- assert_equal "1.2", ta.rev
58
- assert_equal "2.3", ta.ver
57
+ assert_nil ta.rev
58
+ assert_nil ta.ver
59
59
  end
60
60
 
61
61
  def test_creating_new_argument_scopes
@@ -73,7 +73,7 @@ class TestTaskArguments < Test::Unit::TestCase
73
73
  child = Rake::TaskArguments.new(['aa'], [2], parent)
74
74
  assert_equal 2, child.aa
75
75
  end
76
-
76
+
77
77
  def test_default_arguments_values_can_be_merged
78
78
  ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"])
79
79
  ta.with_defaults({ :aa => 'default_val' })
@@ -81,7 +81,7 @@ class TestTaskArguments < Test::Unit::TestCase
81
81
  assert_equal 'original_val', ta[:bb]
82
82
  end
83
83
 
84
- def test_default_arguements_that_dont_match_names_are_ignored
84
+ def test_default_arguments_that_dont_match_names_are_ignored
85
85
  ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"])
86
86
  ta.with_defaults({ "cc" => "default_val" })
87
87
  assert_nil ta[:cc]
@@ -65,14 +65,14 @@ class TestTaskManager < Test::Unit::TestCase
65
65
  end
66
66
 
67
67
  def test_name_lookup_with_implicit_file_tasks
68
- t = @tm["README"]
69
- assert_equal "README", t.name
68
+ t = @tm["README.rdoc"]
69
+ assert_equal "README.rdoc", t.name
70
70
  assert Rake::FileTask === t
71
71
  end
72
72
 
73
73
  def test_name_lookup_with_nonexistent_task
74
74
  assert_exception(RuntimeError) {
75
- t = @tm["DOES NOT EXIST"]
75
+ @tm["DOES NOT EXIST"]
76
76
  }
77
77
  end
78
78
 
@@ -129,7 +129,7 @@ class TestTaskManager < Test::Unit::TestCase
129
129
  end
130
130
  end
131
131
  assert_equal t1, @tm[:t, []]
132
- assert_equal t2, @tm[:t, ["a"]]
132
+ assert_equal t2, @tm[:t, ["a"]]
133
133
  assert_equal t3, @tm[:t, ["a", "b"]]
134
134
  assert_equal s, @tm[:s, ["a", "b"]]
135
135
  assert_equal s, @tm[:s, ["a"]]
@@ -148,10 +148,20 @@ class TestTaskManager < Test::Unit::TestCase
148
148
  @tm["a:x"].invoke
149
149
  assert_equal ["next z"], values
150
150
  end
151
-
151
+
152
152
  end
153
153
 
154
154
  class TestTaskManagerArgumentResolution < Test::Unit::TestCase
155
+ def setup
156
+ super
157
+ Rake.application.options.ignore_deprecate = true
158
+ end
159
+
160
+ def teardown
161
+ Rake.application.options.ignore_deprecate = false
162
+ super
163
+ end
164
+
155
165
  def test_good_arg_patterns
156
166
  assert_equal [:t, [], []], task(:t)
157
167
  assert_equal [:t, [], [:x]], task(:t => :x)