summaryrefslogtreecommitdiff
path: root/lib/rdoc/options.rb
diff options
context:
space:
mode:
authorSven Riedel <[email protected]>2022-11-28 05:36:26 +0100
committergit <[email protected]>2022-11-28 04:36:29 +0000
commite0901f46b7c62acb2cbc9b05ee5753baeb37b82d (patch)
treefd64532fc736c13d81d487e7f941a323c7b40769 /lib/rdoc/options.rb
parent745dcf5326ea2c8e2047a3bddeb0fbb7e7d07649 (diff)
[ruby/rdoc] Add `--no-skipping-tests` option
https://github.com/ruby/rdoc/commit/33925f885f
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r--lib/rdoc/options.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb
index 55994c9dcc..eed0f6b39b 100644
--- a/lib/rdoc/options.rb
+++ b/lib/rdoc/options.rb
@@ -339,6 +339,10 @@ class RDoc::Options
attr_reader :visibility
+ ##
+ # Indicates if files of test suites should be skipped
+ attr_accessor :skip_tests
+
def initialize loaded_options = nil # :nodoc:
init_ivars
override loaded_options if loaded_options
@@ -386,6 +390,7 @@ class RDoc::Options
@write_options = false
@encoding = Encoding::UTF_8
@charset = @encoding.name
+ @skip_tests = true
end
def init_with map # :nodoc:
@@ -778,6 +783,13 @@ Usage: #{opt.program_name} [options] [names...]
opt.separator nil
+ opt.on("--no-skipping-tests", nil,
+ "Don't skip generating documentation for test and spec files") do |value|
+ @skip_tests = false
+ end
+
+ opt.separator nil
+
opt.on("--extension=NEW=OLD", "-E",
"Treat files ending with .new as if they",
"ended with .old. Using '-E cgi=rb' will",