@@ -100,6 +100,7 @@ def self.add_read_only_setting(name, opts={})
100
100
#
101
101
# @note Other scripts invoking `rspec` indirectly will ignore this
102
102
# setting.
103
+ # @return [String]
103
104
add_read_only_setting :default_path
104
105
def default_path = ( path )
105
106
project_source_dirs << path
@@ -109,6 +110,7 @@ def default_path=(path)
109
110
# @macro add_setting
110
111
# Run examples over DRb (default: `false`). RSpec doesn't supply the DRb
111
112
# server, but you can use tools like spork.
113
+ # @return [Boolean]
112
114
add_setting :drb
113
115
114
116
# @macro add_setting
@@ -121,6 +123,7 @@ def default_path=(path)
121
123
122
124
# Indicates if the DSL has been exposed off of modules and `main`.
123
125
# Default: true
126
+ # @return [Boolean]
124
127
def expose_dsl_globally?
125
128
Core ::DSL . exposed_globally?
126
129
end
@@ -197,24 +200,29 @@ def only_failures_but_not_configured?
197
200
198
201
# @macro add_setting
199
202
# The exit code to return if there are any failures (default: 1).
203
+ # @return [Integer]
200
204
add_setting :failure_exit_code
201
205
202
206
# @macro add_setting
203
207
# Whether or not to fail when there are no RSpec examples (default: false).
208
+ # @return [Boolean]
204
209
add_setting :fail_if_no_examples
205
210
206
211
# @macro define_reader
207
212
# Indicates files configured to be required.
213
+ # @return [Array<String>]
208
214
define_reader :requires
209
215
210
216
# @macro define_reader
211
217
# Returns dirs that have been prepended to the load path by the `-I`
212
218
# command line option.
219
+ # @return [Array<String>]
213
220
define_reader :libs
214
221
215
222
# @macro add_setting
216
223
# Determines where RSpec will send its output.
217
224
# Default: `$stdout`.
225
+ # @return [IO, String]
218
226
define_reader :output_stream
219
227
220
228
# Set the output stream for reporter.
@@ -233,6 +241,7 @@ def output_stream=(value)
233
241
234
242
# @macro define_reader
235
243
# Load files matching this pattern (default: `'**{,/*/**}/*_spec.rb'`).
244
+ # @return [String]
236
245
define_reader :pattern
237
246
238
247
# Set pattern to match files to load.
@@ -243,6 +252,7 @@ def pattern=(value)
243
252
244
253
# @macro define_reader
245
254
# Exclude files matching this pattern.
255
+ # @return [String]
246
256
define_reader :exclude_pattern
247
257
248
258
# Set pattern to match files to exclude.
@@ -264,6 +274,7 @@ def exclude_pattern=(value)
264
274
# @macro add_setting
265
275
# Report the times for the slowest examples (default: `false`).
266
276
# Use this to specify the number of examples to include in the profile.
277
+ # @return [Boolean]
267
278
add_setting :profile_examples
268
279
269
280
# @macro add_setting
@@ -318,6 +329,7 @@ def exclude_pattern=(value)
318
329
# @macro add_setting
319
330
# Don't print filter info i.e. "Run options: include {:focus=>true}"
320
331
# (default `false`).
332
+ # return [Boolean]
321
333
add_setting :silence_filter_announcements
322
334
323
335
# @deprecated This config option was added in RSpec 2 to pave the way
@@ -386,16 +398,19 @@ def shared_context_metadata_behavior=(value)
386
398
end
387
399
388
400
# Record the start time of the spec suite to measure load time.
401
+ # return [Time]
389
402
add_setting :start_time
390
403
391
404
# @macro add_setting
392
405
# Use threadsafe options where available.
393
406
# Currently this will place a mutex around memoized values such as let blocks.
407
+ # return [Boolean]
394
408
add_setting :threadsafe
395
409
396
410
# @macro add_setting
397
411
# Maximum count of failed source lines to display in the failure reports.
398
412
# (default `10`).
413
+ # return [Integer]
399
414
add_setting :max_displayed_failure_line_count
400
415
401
416
# @private
@@ -410,8 +425,7 @@ def shared_context_metadata_behavior=(value)
410
425
# @private
411
426
attr_reader :backtrace_formatter , :ordering_manager , :loaded_spec_files
412
427
413
- # rubocop:disable Metrics/AbcSize
414
- # rubocop:disable Metrics/MethodLength
428
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
415
429
416
430
# Build an object to store runtime configuration options and set defaults
417
431
def initialize
@@ -466,8 +480,7 @@ def initialize
466
480
467
481
define_built_in_hooks
468
482
end
469
- # rubocop:enable Metrics/MethodLength
470
- # rubocop:enable Metrics/AbcSize
483
+ # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
471
484
472
485
# @private
473
486
#
@@ -548,6 +561,7 @@ def add_setting(name, opts={})
548
561
end
549
562
550
563
# Returns the configured mock framework adapter module.
564
+ # @return [Symbol]
551
565
def mock_framework
552
566
if @mock_framework . nil?
553
567
begin
@@ -575,12 +589,13 @@ def mock_framework=(framework)
575
589
# To override this behaviour and display a full backtrace, use
576
590
# `--backtrace` on the command line, in a `.rspec` file, or in the
577
591
# `rspec_options` attribute of RSpec's rake task.
592
+ # @return [Array<Regexp>]
578
593
def backtrace_exclusion_patterns
579
594
@backtrace_formatter . exclusion_patterns
580
595
end
581
596
582
597
# Set regular expressions used to exclude lines in backtrace.
583
- # @param patterns [Regexp] set the backtrace exlusion pattern
598
+ # @param patterns [Array< Regexp> ] set backtrace_formatter exlusion_patterns
584
599
def backtrace_exclusion_patterns = ( patterns )
585
600
@backtrace_formatter . exclusion_patterns = patterns
586
601
end
@@ -593,12 +608,13 @@ def backtrace_exclusion_patterns=(patterns)
593
608
# will be included.
594
609
#
595
610
# You can modify the list via the getter, or replace it with the setter.
611
+ # @return [Array<Regexp>]
596
612
def backtrace_inclusion_patterns
597
613
@backtrace_formatter . inclusion_patterns
598
614
end
599
615
600
616
# Set regular expressions used to include lines in backtrace.
601
- # @attr patterns [Regexp] set backtrace_formatter inclusion_patterns
617
+ # @attr patterns [Array< Regexp> ] set backtrace_formatter inclusion_patterns
602
618
def backtrace_inclusion_patterns = ( patterns )
603
619
@backtrace_formatter . inclusion_patterns = patterns
604
620
end
0 commit comments