diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 850b021c8..70efd8e3e 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -797,7 +797,7 @@ def rakefile_location(backtrace=caller) # :nodoc: backtrace.find { |str| str =~ re } || "" end - def set_default_options + def set_default_options # :nodoc: options.always_multitask = false options.backtrace = false options.build_all = false diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 3962c1679..c80464020 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -26,9 +26,9 @@ module DSL private # :call-seq: - # task task_name - # task task_name: dependencies - # task task_name, arguments => dependencies + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) # # Declare a basic task. The +task_name+ is always the first argument. If # the task name contains a ":" it is defined in that namespace. diff --git a/test/test_private_reader.rb b/test/test_private_reader.rb index ef08c9d2c..ee22e1b40 100644 --- a/test/test_private_reader.rb +++ b/test/test_private_reader.rb @@ -2,9 +2,9 @@ require File.expand_path("../helper", __FILE__) require "rake/private_reader" -class TestPrivateAttrs < Rake::TestCase +class TestPrivateAttrs < Rake::TestCase # :nodoc: - class Sample + class Sample # :nodoc: include Rake::PrivateReader private_reader :reader, :a diff --git a/test/test_rake.rb b/test/test_rake.rb index 2cdab492b..a6d08fd35 100644 --- a/test/test_rake.rb +++ b/test/test_rake.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRake < Rake::TestCase +class TestRake < Rake::TestCase # :nodoc: def test_each_dir_parent assert_equal ["a"], alldirs("a") assert_equal ["a/b", "a"], alldirs("a/b") diff --git a/test/test_rake_application.rb b/test/test_rake_application.rb index d17445c7e..27645ea12 100644 --- a/test/test_rake_application.rb +++ b/test/test_rake_application.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeApplication < Rake::TestCase +class TestRakeApplication < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_application_options.rb b/test/test_rake_application_options.rb index d774678b6..0ca06e264 100644 --- a/test/test_rake_application_options.rb +++ b/test/test_rake_application_options.rb @@ -3,7 +3,7 @@ TESTING_REQUIRE = [] -class TestRakeApplicationOptions < Rake::TestCase +class TestRakeApplicationOptions < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_backtrace.rb b/test/test_rake_backtrace.rb index d89817a11..27e3cecb7 100644 --- a/test/test_rake_backtrace.rb +++ b/test/test_rake_backtrace.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "open3" -class TestBacktraceSuppression < Rake::TestCase +class TestBacktraceSuppression < Rake::TestCase # :nodoc: def test_bin_rake_suppressed paths = ["something/bin/rake:12"] @@ -36,7 +36,7 @@ def test_near_system_dir_isnt_suppressed end end -class TestRakeBacktrace < Rake::TestCase +class TestRakeBacktrace < Rake::TestCase # :nodoc: include RubyRunner def setup diff --git a/test/test_rake_clean.rb b/test/test_rake_clean.rb index 612bd2546..b0b1ad602 100644 --- a/test/test_rake_clean.rb +++ b/test/test_rake_clean.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/clean" -class TestRakeClean < Rake::TestCase +class TestRakeClean < Rake::TestCase # :nodoc: def test_clean load "rake/clean.rb", true diff --git a/test/test_rake_cpu_counter.rb b/test/test_rake_cpu_counter.rb index 3c3af15bf..5d04e7c97 100644 --- a/test/test_rake_cpu_counter.rb +++ b/test/test_rake_cpu_counter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeCpuCounter < Rake::TestCase +class TestRakeCpuCounter < Rake::TestCase # :nodoc: def setup super @@ -28,7 +28,7 @@ def @cpu_counter.count; raise; end assert_equal(4, @cpu_counter.count_with_default) end - class TestClassMethod < Rake::TestCase + class TestClassMethod < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_definitions.rb b/test/test_rake_definitions.rb index 2dee13a34..52e468e3b 100644 --- a/test/test_rake_definitions.rb +++ b/test/test_rake_definitions.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeDefinitions < Rake::TestCase +class TestRakeDefinitions < Rake::TestCase # :nodoc: include Rake EXISTINGFILE = "existing" diff --git a/test/test_rake_directory_task.rb b/test/test_rake_directory_task.rb index d5fd26f27..5635afd13 100644 --- a/test/test_rake_directory_task.rb +++ b/test/test_rake_directory_task.rb @@ -3,7 +3,7 @@ require "fileutils" require "pathname" -class TestRakeDirectoryTask < Rake::TestCase +class TestRakeDirectoryTask < Rake::TestCase # :nodoc: include Rake def test_directory diff --git a/test/test_rake_dsl.rb b/test/test_rake_dsl.rb index 162961446..6d0e7344d 100644 --- a/test/test_rake_dsl.rb +++ b/test/test_rake_dsl.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeDsl < Rake::TestCase +class TestRakeDsl < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_early_time.rb b/test/test_rake_early_time.rb index dc0550b2a..95040f67a 100644 --- a/test/test_rake_early_time.rb +++ b/test/test_rake_early_time.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeEarlyTime < Rake::TestCase +class TestRakeEarlyTime < Rake::TestCase # :nodoc: def test_create early = Rake::EarlyTime.instance assert early <= Time.now diff --git a/test/test_rake_extension.rb b/test/test_rake_extension.rb index 0627ef9b7..aeb8ce148 100644 --- a/test/test_rake_extension.rb +++ b/test/test_rake_extension.rb @@ -2,9 +2,9 @@ require File.expand_path("../helper", __FILE__) require "stringio" -class TestRakeExtension < Rake::TestCase +class TestRakeExtension < Rake::TestCase # :nodoc: - module Redirect + module Redirect # :nodoc: def error_redirect old_err = $stderr result = StringIO.new @@ -16,7 +16,7 @@ def error_redirect end end - class Sample + class Sample # :nodoc: extend Redirect def duplicate_method diff --git a/test/test_rake_file_creation_task.rb b/test/test_rake_file_creation_task.rb index e99884a55..05af13bb1 100644 --- a/test/test_rake_file_creation_task.rb +++ b/test/test_rake_file_creation_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeFileCreationTask < Rake::TestCase +class TestRakeFileCreationTask < Rake::TestCase # :nodoc: include Rake DUMMY_DIR = "dummy_dir" diff --git a/test/test_rake_file_list.rb b/test/test_rake_file_list.rb index 3e2622acd..97ab99828 100644 --- a/test/test_rake_file_list.rb +++ b/test/test_rake_file_list.rb @@ -2,8 +2,8 @@ require File.expand_path("../helper", __FILE__) require "pathname" -class TestRakeFileList < Rake::TestCase - FileList = Rake::FileList +class TestRakeFileList < Rake::TestCase # :nodoc: + FileList = Rake::FileList # :nodoc: def setup super diff --git a/test/test_rake_file_list_path_map.rb b/test/test_rake_file_list_path_map.rb index 71402cf36..2c51a2d72 100644 --- a/test/test_rake_file_list_path_map.rb +++ b/test/test_rake_file_list_path_map.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeFileListPathMap < Rake::TestCase +class TestRakeFileListPathMap < Rake::TestCase # :nodoc: def test_file_list_supports_pathmap assert_equal ["a", "b"], FileList["dir/a.rb", "dir/b.rb"].pathmap("%n") end diff --git a/test/test_rake_file_task.rb b/test/test_rake_file_task.rb index 774cbafd4..61303d88a 100644 --- a/test/test_rake_file_task.rb +++ b/test/test_rake_file_task.rb @@ -3,7 +3,7 @@ require "fileutils" require "pathname" -class TestRakeFileTask < Rake::TestCase +class TestRakeFileTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_file_utils.rb b/test/test_rake_file_utils.rb index 90526b1d9..7e9674fdc 100644 --- a/test/test_rake_file_utils.rb +++ b/test/test_rake_file_utils.rb @@ -3,7 +3,7 @@ require "fileutils" require "stringio" -class TestRakeFileUtils < Rake::TestCase +class TestRakeFileUtils < Rake::TestCase # :nodoc: def setup super @rake_test_sh = ENV["RAKE_TEST_SH"] @@ -47,7 +47,7 @@ def test_ln assert_equal "TEST_LN\n", File.read("b") end - class BadLink + class BadLink # :nodoc: include Rake::FileUtilsExt attr_reader :cp_args diff --git a/test/test_rake_functional.rb b/test/test_rake_functional.rb index daf832254..afc31d28f 100644 --- a/test/test_rake_functional.rb +++ b/test/test_rake_functional.rb @@ -3,7 +3,7 @@ require "fileutils" require "open3" -class TestRakeFunctional < Rake::TestCase +class TestRakeFunctional < Rake::TestCase # :nodoc: include RubyRunner def setup diff --git a/test/test_rake_invocation_chain.rb b/test/test_rake_invocation_chain.rb index 338180aaa..bf918f758 100644 --- a/test/test_rake_invocation_chain.rb +++ b/test/test_rake_invocation_chain.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeInvocationChain < Rake::TestCase +class TestRakeInvocationChain < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_late_time.rb b/test/test_rake_late_time.rb index d07b441a0..776b02d22 100644 --- a/test/test_rake_late_time.rb +++ b/test/test_rake_late_time.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeLateTime < Rake::TestCase +class TestRakeLateTime < Rake::TestCase # :nodoc: def test_late_time_comparisons late = Rake::LATE assert_equal late, late diff --git a/test/test_rake_linked_list.rb b/test/test_rake_linked_list.rb index d111575b2..656b50ac2 100644 --- a/test/test_rake_linked_list.rb +++ b/test/test_rake_linked_list.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestLinkedList < Rake::TestCase +class TestLinkedList < Rake::TestCase # :nodoc: include Rake def test_empty_list diff --git a/test/test_rake_makefile_loader.rb b/test/test_rake_makefile_loader.rb index 75713cd2f..4f5270e0a 100644 --- a/test/test_rake_makefile_loader.rb +++ b/test/test_rake_makefile_loader.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/loaders/makefile" -class TestRakeMakefileLoader < Rake::TestCase +class TestRakeMakefileLoader < Rake::TestCase # :nodoc: include Rake def test_parse diff --git a/test/test_rake_multi_task.rb b/test/test_rake_multi_task.rb index 31d88e5c3..641e65f4b 100644 --- a/test/test_rake_multi_task.rb +++ b/test/test_rake_multi_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "thread" -class TestRakeMultiTask < Rake::TestCase +class TestRakeMultiTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_name_space.rb b/test/test_rake_name_space.rb index e8d4d6b20..a1a814cfd 100644 --- a/test/test_rake_name_space.rb +++ b/test/test_rake_name_space.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeNameSpace < Rake::TestCase +class TestRakeNameSpace < Rake::TestCase # :nodoc: - class TM + class TM # :nodoc: include Rake::TaskManager end diff --git a/test/test_rake_package_task.rb b/test/test_rake_package_task.rb index 2634267ee..d3886f8ca 100644 --- a/test/test_rake_package_task.rb +++ b/test/test_rake_package_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/packagetask" -class TestRakePackageTask < Rake::TestCase +class TestRakePackageTask < Rake::TestCase # :nodoc: def test_initialize touch "install.rb" diff --git a/test/test_rake_path_map.rb b/test/test_rake_path_map.rb index 92cf337cb..1551247ec 100644 --- a/test/test_rake_path_map.rb +++ b/test/test_rake_path_map.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMap < Rake::TestCase +class TestRakePathMap < Rake::TestCase # :nodoc: def test_returns_self_with_no_args assert_equal "abc.rb", "abc.rb".pathmap diff --git a/test/test_rake_path_map_explode.rb b/test/test_rake_path_map_explode.rb index 3174d6ccc..877a8e0c9 100644 --- a/test/test_rake_path_map_explode.rb +++ b/test/test_rake_path_map_explode.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMapExplode < Rake::TestCase +class TestRakePathMapExplode < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_path_map_partial.rb b/test/test_rake_path_map_partial.rb index 9daf44ca5..e73ec56b6 100644 --- a/test/test_rake_path_map_partial.rb +++ b/test/test_rake_path_map_partial.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePathMapPartial < Rake::TestCase +class TestRakePathMapPartial < Rake::TestCase # :nodoc: def test_pathmap_partial @path = "1/2/file".dup def @path.call(n) diff --git a/test/test_rake_pseudo_status.rb b/test/test_rake_pseudo_status.rb index 5a54bc200..008621f49 100644 --- a/test/test_rake_pseudo_status.rb +++ b/test/test_rake_pseudo_status.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakePseudoStatus < Rake::TestCase +class TestRakePseudoStatus < Rake::TestCase # :nodoc: def test_with_zero_exit_status s = Rake::PseudoStatus.new assert_equal 0, s.exitstatus diff --git a/test/test_rake_rake_test_loader.rb b/test/test_rake_rake_test_loader.rb index bf44235c0..4423a9b1c 100644 --- a/test/test_rake_rake_test_loader.rb +++ b/test/test_rake_rake_test_loader.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeRakeTestLoader < Rake::TestCase +class TestRakeRakeTestLoader < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_reduce_compat.rb b/test/test_rake_reduce_compat.rb index f3db9a79c..17986dcde 100644 --- a/test/test_rake_reduce_compat.rb +++ b/test/test_rake_reduce_compat.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "open3" -class TestRakeReduceCompat < Rake::TestCase +class TestRakeReduceCompat < Rake::TestCase # :nodoc: include RubyRunner def invoke_normal(task_name) diff --git a/test/test_rake_require.rb b/test/test_rake_require.rb index 899aba5ca..6309277da 100644 --- a/test/test_rake_require.rb +++ b/test/test_rake_require.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeRequire < Rake::TestCase +class TestRakeRequire < Rake::TestCase # :nodoc: def setup super $LOAD_PATH.unshift "." if jruby17? diff --git a/test/test_rake_rules.rb b/test/test_rake_rules.rb index 52934c258..bfb8e775f 100644 --- a/test/test_rake_rules.rb +++ b/test/test_rake_rules.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeRules < Rake::TestCase +class TestRakeRules < Rake::TestCase # :nodoc: include Rake SRCFILE = "abc.c" diff --git a/test/test_rake_scope.rb b/test/test_rake_scope.rb index 50bb1810b..24ac03408 100644 --- a/test/test_rake_scope.rb +++ b/test/test_rake_scope.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeScope < Rake::TestCase +class TestRakeScope < Rake::TestCase # :nodoc: include Rake def test_path_against_empty_scope diff --git a/test/test_rake_task.rb b/test/test_rake_task.rb index ab24cbba5..ee3e9d35c 100644 --- a/test/test_rake_task.rb +++ b/test/test_rake_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "fileutils" -class TestRakeTask < Rake::TestCase +class TestRakeTask < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_task_argument_parsing.rb b/test/test_rake_task_argument_parsing.rb index e65712b37..ed12ea0b4 100644 --- a/test/test_rake_task_argument_parsing.rb +++ b/test/test_rake_task_argument_parsing.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskArgumentParsing < Rake::TestCase +class TestRakeTaskArgumentParsing < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_task_arguments.rb b/test/test_rake_task_arguments.rb index 2ae3652da..245a71661 100644 --- a/test/test_rake_task_arguments.rb +++ b/test/test_rake_task_arguments.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskArguments < Rake::TestCase +class TestRakeTaskArguments < Rake::TestCase # :nodoc: def teardown ENV.delete("rev") ENV.delete("VER") diff --git a/test/test_rake_task_manager.rb b/test/test_rake_task_manager.rb index 94347b6b6..7d8c40902 100644 --- a/test/test_rake_task_manager.rb +++ b/test/test_rake_task_manager.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskManager < Rake::TestCase +class TestRakeTaskManager < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_task_manager_argument_resolution.rb b/test/test_rake_task_manager_argument_resolution.rb index c07be6f5e..585932c5c 100644 --- a/test/test_rake_task_manager_argument_resolution.rb +++ b/test/test_rake_task_manager_argument_resolution.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskManagerArgumentResolution < Rake::TestCase +class TestRakeTaskManagerArgumentResolution < Rake::TestCase # :nodoc: def test_good_arg_patterns assert_equal [:t, [], []], task(:t) diff --git a/test/test_rake_task_with_arguments.rb b/test/test_rake_task_with_arguments.rb index 61cf8e049..46edcd112 100644 --- a/test/test_rake_task_with_arguments.rb +++ b/test/test_rake_task_with_arguments.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTaskWithArguments < Rake::TestCase +class TestRakeTaskWithArguments < Rake::TestCase # :nodoc: include Rake def setup diff --git a/test/test_rake_test_task.rb b/test/test_rake_test_task.rb index 396e05924..ed2313b91 100644 --- a/test/test_rake_test_task.rb +++ b/test/test_rake_test_task.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/testtask" -class TestRakeTestTask < Rake::TestCase +class TestRakeTestTask < Rake::TestCase # :nodoc: include Rake def test_initialize diff --git a/test/test_rake_thread_pool.rb b/test/test_rake_thread_pool.rb index ceb8a5d1b..42f648854 100644 --- a/test/test_rake_thread_pool.rb +++ b/test/test_rake_thread_pool.rb @@ -2,7 +2,7 @@ require File.expand_path("../helper", __FILE__) require "rake/thread_pool" -class TestRakeTestThreadPool < Rake::TestCase +class TestRakeTestThreadPool < Rake::TestCase # :nodoc: include Rake def test_pool_executes_in_current_thread_for_zero_threads diff --git a/test/test_rake_top_level_functions.rb b/test/test_rake_top_level_functions.rb index f3675a096..f0dec1b76 100644 --- a/test/test_rake_top_level_functions.rb +++ b/test/test_rake_top_level_functions.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeTopLevelFunctions < Rake::TestCase +class TestRakeTopLevelFunctions < Rake::TestCase # :nodoc: def setup super diff --git a/test/test_rake_win32.rb b/test/test_rake_win32.rb index 6c341f486..ed08ef09e 100644 --- a/test/test_rake_win32.rb +++ b/test/test_rake_win32.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true require File.expand_path("../helper", __FILE__) -class TestRakeWin32 < Rake::TestCase +class TestRakeWin32 < Rake::TestCase # :nodoc: - Win32 = Rake::Win32 + Win32 = Rake::Win32 # :nodoc: def test_win32_system_dir_uses_home_if_defined ENV["HOME"] = 'C:\\HP' diff --git a/test/test_thread_history_display.rb b/test/test_thread_history_display.rb index 8adb1940a..026576446 100644 --- a/test/test_thread_history_display.rb +++ b/test/test_thread_history_display.rb @@ -3,7 +3,7 @@ require "rake/thread_history_display" -class TestThreadHistoryDisplay < Rake::TestCase +class TestThreadHistoryDisplay < Rake::TestCase # :nodoc: def setup super @time = 1_000_000 diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb index 34dab6162..46403870f 100644 --- a/test/test_trace_output.rb +++ b/test/test_trace_output.rb @@ -2,10 +2,10 @@ require File.expand_path("../helper", __FILE__) require "stringio" -class TestTraceOutput < Rake::TestCase +class TestTraceOutput < Rake::TestCase # :nodoc: include Rake::TraceOutput - class PrintSpy + class PrintSpy # :nodoc: attr_reader :result, :calls def initialize