rspec-core 3.13.0 → 3.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Changelog.md +16 -1
- data/lib/rspec/core/bisect/example_minimizer.rb +1 -1
- data/lib/rspec/core/bisect/fork_runner.rb +2 -0
- data/lib/rspec/core/configuration.rb +9 -3
- data/lib/rspec/core/configuration_options.rb +2 -0
- data/lib/rspec/core/did_you_mean.rb +6 -0
- data/lib/rspec/core/formatters/exception_presenter.rb +6 -0
- data/lib/rspec/core/formatters/html_snippet_extractor.rb +2 -0
- data/lib/rspec/core/hooks.rb +1 -1
- data/lib/rspec/core/metadata.rb +1 -1
- data/lib/rspec/core/option_parser.rb +2 -0
- data/lib/rspec/core/pending.rb +1 -1
- data/lib/rspec/core/rake_task.rb +2 -0
- data/lib/rspec/core/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +5 -8
- metadata.gz.sig +2 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a0cd38f51cf638690afe2b845336ad8539421323e3e9efcdbd83cdfd6ec5070
|
4
|
+
data.tar.gz: 405327927cf750d0a4394f9bc49dc326ac9896aa0ed3ee23cf0145e9a2dbd802
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253ed53ab962eba6aa83f6ae2687d49b0b1ef12d6cdc25659016f08c298c2ac6680c9b4b590d8589804ba167c67b6299336e786c6a94f954b79d3ed0b0c0f4e7
|
7
|
+
data.tar.gz: 70246622e97de4556919c9eac2d307a5a79e3552b8b4d5eb457827873c306e47bea6896b4c07b0a95f1e9b1ccf0de01ec9a2c59528e15392e19f82dfaed32b4d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.13.2...3-13-maintenance)
|
3
|
+
|
4
|
+
### 3.13.2 / 2024-10-18
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.13.1...v3.13.2)
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
|
9
|
+
* `RSpec::Configuration#requires` will reflect files already required, whilst requiring
|
10
|
+
them. (Jon Rowe, #3117)
|
11
|
+
|
12
|
+
### 3.13.1 / 2024-09-02
|
13
|
+
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.13.0...v3.13.1)
|
14
|
+
|
15
|
+
Bug fixes:
|
16
|
+
|
17
|
+
* Sort ids to run as the original order to fix `--bisect`. (Maki Kawahara, #3093)
|
3
18
|
|
4
19
|
### 3.13.0 / 2024-02-04
|
5
20
|
[Full Changelog](http://github.com/rspec/rspec-core/compare/v3.12.3...v3.13.0)
|
@@ -136,7 +136,7 @@ module RSpec
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def get_expected_failures_for?(ids)
|
139
|
-
ids_to_run = ids + failed_example_ids
|
139
|
+
ids_to_run = all_example_ids & (ids + failed_example_ids)
|
140
140
|
notify(
|
141
141
|
:bisect_individual_run_start,
|
142
142
|
:command => shell_command.repro_command_from(ids_to_run),
|
@@ -102,6 +102,7 @@ module RSpec
|
|
102
102
|
private
|
103
103
|
|
104
104
|
def run_specs(run_descriptor)
|
105
|
+
# :nocov: - Executed in a forked process, by integration/bisect_spec
|
105
106
|
$stdout = $stderr = @spec_output
|
106
107
|
formatter = CaptureFormatter.new(run_descriptor.failed_example_ids)
|
107
108
|
|
@@ -125,6 +126,7 @@ module RSpec
|
|
125
126
|
else
|
126
127
|
@channel.send(latest_run_results)
|
127
128
|
end
|
129
|
+
# :nocov:
|
128
130
|
end
|
129
131
|
end
|
130
132
|
|
@@ -1402,6 +1402,9 @@ module RSpec
|
|
1402
1402
|
#
|
1403
1403
|
# # included in examples with `:type => :request` metadata
|
1404
1404
|
# config.include(AuthenticationHelpers, :type => :request)
|
1405
|
+
#
|
1406
|
+
# # included in examples where the `:type` metadata matches a proc condition
|
1407
|
+
# config.include(AuthenticationHelpers, :type => proc { |type, _metadata| [:request, :controller].include?(type) })
|
1405
1408
|
# end
|
1406
1409
|
#
|
1407
1410
|
# describe "edit profile", :preferences, :type => :request do
|
@@ -1594,8 +1597,10 @@ module RSpec
|
|
1594
1597
|
def requires=(paths)
|
1595
1598
|
directories = ['lib', default_path].select { |p| File.directory? p }
|
1596
1599
|
RSpec::Core::RubyProject.add_to_load_path(*directories)
|
1597
|
-
paths.each { |path|
|
1598
|
-
|
1600
|
+
paths.each { |path|
|
1601
|
+
load_file_handling_errors(:require, path)
|
1602
|
+
@requires << path
|
1603
|
+
}
|
1599
1604
|
end
|
1600
1605
|
|
1601
1606
|
# @private
|
@@ -1764,8 +1769,9 @@ module RSpec
|
|
1764
1769
|
# @private
|
1765
1770
|
RAISE_ERROR_WARNING_NOTIFIER = lambda { |message| raise message }
|
1766
1771
|
|
1767
|
-
# Turns warnings into errors. This can be useful when
|
1772
|
+
# Turns RSpec warnings into errors. This can be useful when
|
1768
1773
|
# you want RSpec to run in a 'strict' no warning situation.
|
1774
|
+
# (Note this does not capture or raise on Ruby warnings).
|
1769
1775
|
#
|
1770
1776
|
# @example
|
1771
1777
|
#
|
@@ -177,6 +177,7 @@ module RSpec
|
|
177
177
|
FlatMap.flat_map(config_lines, &:shellsplit)
|
178
178
|
end
|
179
179
|
|
180
|
+
# :nocov:
|
180
181
|
def options_file_as_erb_string(path)
|
181
182
|
if RUBY_VERSION >= '2.6'
|
182
183
|
ERB.new(File.read(path), :trim_mode => '-').result(binding)
|
@@ -184,6 +185,7 @@ module RSpec
|
|
184
185
|
ERB.new(File.read(path), nil, '-').result(binding)
|
185
186
|
end
|
186
187
|
end
|
188
|
+
# :nocov:
|
187
189
|
|
188
190
|
def custom_options_file
|
189
191
|
command_line_options[:custom_options_file]
|
@@ -11,6 +11,7 @@ module RSpec
|
|
11
11
|
|
12
12
|
if defined?(::DidYouMean::SpellChecker)
|
13
13
|
# provide probable suggestions
|
14
|
+
# :nocov: - not installed on CI
|
14
15
|
def call
|
15
16
|
checker = ::DidYouMean::SpellChecker.new(:dictionary => Dir["spec/**/*.rb"])
|
16
17
|
probables = checker.correct(relative_file_name.sub('./', ''))[0..2]
|
@@ -18,15 +19,19 @@ module RSpec
|
|
18
19
|
|
19
20
|
formats probables
|
20
21
|
end
|
22
|
+
# :nocov:
|
21
23
|
else
|
22
24
|
# return a hint if API for ::DidYouMean::SpellChecker not supported
|
25
|
+
# :nocov:
|
23
26
|
def call
|
24
27
|
"\nHint: Install the `did_you_mean` gem in order to provide suggestions for similarly named files."
|
25
28
|
end
|
29
|
+
# :nocov:
|
26
30
|
end
|
27
31
|
|
28
32
|
private
|
29
33
|
|
34
|
+
# :nocov:
|
30
35
|
def formats(probables)
|
31
36
|
rspec_format = probables.map { |s, _| "rspec ./#{s}" }
|
32
37
|
red_font(top_and_tail rspec_format)
|
@@ -41,6 +46,7 @@ module RSpec
|
|
41
46
|
colorizer = ::RSpec::Core::Formatters::ConsoleCodes
|
42
47
|
colorizer.wrap mytext, :failure
|
43
48
|
end
|
49
|
+
# :nocov:
|
44
50
|
end
|
45
51
|
end
|
46
52
|
end
|
@@ -180,6 +180,7 @@ module RSpec
|
|
180
180
|
end
|
181
181
|
|
182
182
|
# rubocop:disable Lint/RescueException
|
183
|
+
# :nocov:
|
183
184
|
if SyntaxError.instance_methods.include?(:detailed_message)
|
184
185
|
def exception_message_string(exception)
|
185
186
|
case exception
|
@@ -197,6 +198,7 @@ module RSpec
|
|
197
198
|
"A #{exception.class} for which `exception.message.to_s` raises #{other.class}."
|
198
199
|
end
|
199
200
|
end
|
201
|
+
# :nocov:
|
200
202
|
# rubocop:enable Lint/RescueException
|
201
203
|
|
202
204
|
def exception_lines
|
@@ -252,7 +254,9 @@ module RSpec
|
|
252
254
|
rescue SnippetExtractor::NoSuchLineError
|
253
255
|
["Unable to find matching line in #{file_path}"]
|
254
256
|
rescue SecurityError
|
257
|
+
# :nocov: - SecurityError is no longer produced starting in ruby 2.7
|
255
258
|
["Unable to read failed line"]
|
259
|
+
# :nocov:
|
256
260
|
end
|
257
261
|
|
258
262
|
def find_failed_line
|
@@ -284,9 +288,11 @@ module RSpec
|
|
284
288
|
encoded_string(description)
|
285
289
|
end
|
286
290
|
else # for 1.8.7
|
291
|
+
# :nocov:
|
287
292
|
def encoded_description(description)
|
288
293
|
description
|
289
294
|
end
|
295
|
+
# :nocov:
|
290
296
|
end
|
291
297
|
|
292
298
|
def exception_backtrace
|
data/lib/rspec/core/hooks.rb
CHANGED
@@ -461,7 +461,7 @@ module RSpec
|
|
461
461
|
# TODO: consider making this an error in RSpec 4. For SemVer reasons,
|
462
462
|
# we are only warning in RSpec 3.
|
463
463
|
RSpec.warn_with "WARNING: `around(:context)` hooks are not supported and " \
|
464
|
-
"behave like `around(:example)
|
464
|
+
"behave like `around(:example)`."
|
465
465
|
end
|
466
466
|
|
467
467
|
hook = HOOK_TYPES[position][scope].new(block, options)
|
data/lib/rspec/core/metadata.rb
CHANGED
@@ -185,7 +185,9 @@ module RSpec::Core
|
|
185
185
|
|
186
186
|
parser.on('-w', '--warnings', 'Enable ruby warnings') do
|
187
187
|
if Object.const_defined?(:Warning) && Warning.respond_to?(:[]=)
|
188
|
+
# :nocov: on older Ruby without Warning
|
188
189
|
Warning[:deprecated] = true
|
190
|
+
# :nocov:
|
189
191
|
end
|
190
192
|
$VERBOSE = true
|
191
193
|
end
|
data/lib/rspec/core/pending.rb
CHANGED
@@ -59,7 +59,7 @@ module RSpec
|
|
59
59
|
# executed. If you need to consider hooks as pending as well you can use
|
60
60
|
# the pending metadata as an alternative, e.g.
|
61
61
|
# `it "does something", pending: "message"`.
|
62
|
-
def pending(message=nil)
|
62
|
+
def pending(message=nil, &_block)
|
63
63
|
current_example = RSpec.current_example
|
64
64
|
|
65
65
|
if block_given?
|
data/lib/rspec/core/rake_task.rb
CHANGED
@@ -47,6 +47,7 @@ module RSpec
|
|
47
47
|
|
48
48
|
if RUBY_VERSION < "1.9.0" || Support::Ruby.jruby?
|
49
49
|
# Run RSpec with a clean (empty) environment is not supported
|
50
|
+
# :nocov:
|
50
51
|
def with_clean_environment=(_value)
|
51
52
|
raise ArgumentError, "Running in a clean environment is not supported on Ruby versions before 1.9.0"
|
52
53
|
end
|
@@ -55,6 +56,7 @@ module RSpec
|
|
55
56
|
def with_clean_environment
|
56
57
|
false
|
57
58
|
end
|
59
|
+
# :nocov:
|
58
60
|
else
|
59
61
|
# Run RSpec with a clean (empty) environment.
|
60
62
|
attr_accessor :with_clean_environment
|
data/lib/rspec/core/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.13.
|
4
|
+
version: 3.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
8
8
|
- David Chelimsky
|
9
9
|
- Chad Humphries
|
10
10
|
- Myron Marston
|
11
|
-
autorequire:
|
12
11
|
bindir: exe
|
13
12
|
cert_chain:
|
14
13
|
- |
|
@@ -46,7 +45,7 @@ cert_chain:
|
|
46
45
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
47
46
|
F3MdtaDehhjC
|
48
47
|
-----END CERTIFICATE-----
|
49
|
-
date: 2024-
|
48
|
+
date: 2024-10-18 00:00:00.000000000 Z
|
50
49
|
dependencies:
|
51
50
|
- !ruby/object:Gem::Dependency
|
52
51
|
name: rspec-support
|
@@ -267,11 +266,10 @@ licenses:
|
|
267
266
|
- MIT
|
268
267
|
metadata:
|
269
268
|
bug_tracker_uri: https://github.com/rspec/rspec-core/issues
|
270
|
-
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.13.
|
269
|
+
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.13.2/Changelog.md
|
271
270
|
documentation_uri: https://rspec.info/documentation/
|
272
271
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
273
272
|
source_code_uri: https://github.com/rspec/rspec-core
|
274
|
-
post_install_message:
|
275
273
|
rdoc_options:
|
276
274
|
- "--charset=UTF-8"
|
277
275
|
require_paths:
|
@@ -287,8 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
287
285
|
- !ruby/object:Gem::Version
|
288
286
|
version: '0'
|
289
287
|
requirements: []
|
290
|
-
rubygems_version: 3.
|
291
|
-
signing_key:
|
288
|
+
rubygems_version: 3.6.0.dev
|
292
289
|
specification_version: 4
|
293
|
-
summary: rspec-core-3.13.
|
290
|
+
summary: rspec-core-3.13.2
|
294
291
|
test_files: []
|
metadata.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
���oM�F/��#�����)���Q��
|
4
|
-
��h�F(A�[{ִ��P�Dž����5���f��a�㼘|A9��2���%�Q��~�a�����y���Z���W�mH|���6h�=�Ӳ�_�
|
1
|
+
i�2��$�+�|�L{�0�[�x)>�t�@�> �7���*U�j�ۉH���q3
|
2
|
+
��䈤��D��N�p���d��gq� )Y�O`7PYǹ:�.��m�JF���8��&f��.Zh`50B%q���5�Јu@k;p➛;��c��ˇ��;�u�����6��-��.��=�8��N��\�=m�Vҏ{t���V�K��ס�*���+�В�tѱ;��T7eh�s�������C">�����Ҋs���wm���F��Hq���8�h@�� Ղ}���<PfpJEr�rf�Y��C4�K��bŏ`�3�6TS>^��W����V��%�����/��b�P���+��KK�l`����z<�_���(�y�7�Q�{�k�,"�;i��ӿ�E%�n���W���
|