rspec-core 3.13.1 → 3.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Changelog.md +278 -260
- data/lib/rspec/core/bisect/fork_runner.rb +2 -0
- data/lib/rspec/core/configuration.rb +7 -2
- data/lib/rspec/core/configuration_options.rb +2 -0
- data/lib/rspec/core/did_you_mean.rb +6 -0
- data/lib/rspec/core/drb.rb +1 -1
- data/lib/rspec/core/example.rb +1 -1
- data/lib/rspec/core/filter_manager.rb +2 -2
- 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/metadata.rb +1 -1
- data/lib/rspec/core/option_parser.rb +2 -0
- data/lib/rspec/core/rake_task.rb +2 -0
- data/lib/rspec/core/reporter.rb +6 -5
- data/lib/rspec/core/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +21 -134
- metadata.gz.sig +0 -0
@@ -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
|
@@ -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
|
data/lib/rspec/core/drb.rb
CHANGED
@@ -91,7 +91,7 @@ module RSpec
|
|
91
91
|
def add_filter(argv, name, hash)
|
92
92
|
hash.each_pair do |k, v|
|
93
93
|
next if CONDITIONAL_FILTERS.include?(k)
|
94
|
-
tag = name == :inclusion ? k.to_s : "~#{k}".dup
|
94
|
+
tag = name == :inclusion ? k.to_s.dup : "~#{k}".dup
|
95
95
|
tag << ":#{v}" if v.is_a?(String)
|
96
96
|
argv << "--tag" << tag
|
97
97
|
end unless hash.empty?
|
data/lib/rspec/core/example.rb
CHANGED
@@ -98,7 +98,7 @@ module RSpec
|
|
98
98
|
loaded_spec_files = RSpec.configuration.loaded_spec_files
|
99
99
|
|
100
100
|
Metadata.ascending(metadata) do |meta|
|
101
|
-
|
101
|
+
break meta[:location] if loaded_spec_files.include?(meta[:absolute_file_path])
|
102
102
|
end
|
103
103
|
end
|
104
104
|
end
|
@@ -202,8 +202,8 @@ module RSpec
|
|
202
202
|
|
203
203
|
def split_file_scoped_rules
|
204
204
|
rules_dup = @rules.dup
|
205
|
-
locations = rules_dup.delete(:locations) { Hash.new
|
206
|
-
ids = rules_dup.delete(:ids) { Hash.new
|
205
|
+
locations = rules_dup.delete(:locations) { Hash.new { [] } }
|
206
|
+
ids = rules_dup.delete(:ids) { Hash.new { [] } }
|
207
207
|
|
208
208
|
return locations, ids, self.class.new(rules_dup)
|
209
209
|
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/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/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/reporter.rb
CHANGED
@@ -172,10 +172,11 @@ module RSpec::Core
|
|
172
172
|
# @private
|
173
173
|
def finish
|
174
174
|
close_after do
|
175
|
-
|
175
|
+
examples_notification = Notifications::ExamplesNotification.new(self)
|
176
|
+
stop(examples_notification)
|
176
177
|
notify :start_dump, Notifications::NullNotification
|
177
|
-
notify :dump_pending,
|
178
|
-
notify :dump_failures,
|
178
|
+
notify :dump_pending, examples_notification
|
179
|
+
notify :dump_failures, examples_notification
|
179
180
|
notify :deprecation_summary, Notifications::NullNotification
|
180
181
|
unless mute_profile_output?
|
181
182
|
notify :dump_profile, Notifications::ProfileNotification.new(@duration, @examples,
|
@@ -197,9 +198,9 @@ module RSpec::Core
|
|
197
198
|
end
|
198
199
|
|
199
200
|
# @private
|
200
|
-
def stop
|
201
|
+
def stop(notification)
|
201
202
|
@duration = (RSpec::Core::Time.now - @start).to_f if @start
|
202
|
-
notify :stop,
|
203
|
+
notify :stop, notification
|
203
204
|
end
|
204
205
|
|
205
206
|
# @private
|
data/lib/rspec/core/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -12,11 +12,11 @@ bindir: exe
|
|
12
12
|
cert_chain:
|
13
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0TBAIwADALBgNVHQ8EBAMCBLAw
|
34
|
+
HQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMA0GCSqGSIb3DQEBCwUAA4IC
|
35
|
+
AQBGBr0ll2yLrkO6IeK5Q7qZFnANaUCKfi6Of9VztZJXgKAU5KAQxyOidGktoA5N
|
36
|
+
lp+bFKudRkW8jSehqoNaNBdSZ9Bc07EGMXIhUFJZF9rq7Z2SKPwUm6EaSsBK13QR
|
37
|
+
U4K6wuaw5ZJSFzklapoGOJRGnFlnNtlhNFY6+tTwCeblwZbcuYGyGY8+Rg7GbyVl
|
38
|
+
3Tr4Gi1aS/qG/MDXKdE8HWm39dmaAMdbw6dg1VBd0JrX2VqH7xvE1dM/D3OlKrNp
|
39
|
+
gNFRNJig3Y8qPjocZR0cGkhgZoC9wribWxHSNawZm4CoV3fja2HNx9QyM7BaB+as
|
40
|
+
yuqAiBbA7vBcyc8nKATip3mxbyXYXoDD7nmO8JCPP7O/WsgG+U/B2a0kPdvYFoxE
|
41
|
+
Q0Js3GtFCuMvL+0rifqdxBOLtu0Pw9q4RvToTJIl2IR6eTgCb82B1hw9qKf7PjuL
|
42
|
+
BoEsYjjDhGw6FZvcJG8O6uj7aB+z4aF21YR74UGL7sq/RIPNNez5JI95jTGfqCPy
|
43
|
+
6yo0w3zja3yg28QK3Fj+tbOHeSLv9SDQWi/1jiPprGzbxGvbVvjvX11YZc46vkmY
|
44
|
+
AwP+qZPPf97FXXZGEGIYhhHpnj+Ltx9nCetRPiZ4rvYBcXgCWVQSg6eiEofrMwn/
|
45
|
+
AKMCABhZ1Y2eATsfMgdkmIZk7JIPZiSi6eUxPiCMP9M/pw==
|
47
46
|
-----END CERTIFICATE-----
|
48
|
-
date:
|
47
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
49
48
|
dependencies:
|
50
49
|
- !ruby/object:Gem::Dependency
|
51
50
|
name: rspec-support
|
@@ -61,118 +60,6 @@ dependencies:
|
|
61
60
|
- - "~>"
|
62
61
|
- !ruby/object:Gem::Version
|
63
62
|
version: 3.13.0
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: cucumber
|
66
|
-
requirement: !ruby/object:Gem::Requirement
|
67
|
-
requirements:
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '1.3'
|
71
|
-
type: :development
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '1.3'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: minitest
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - "~>"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '5.3'
|
85
|
-
type: :development
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '5.3'
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: aruba
|
94
|
-
requirement: !ruby/object:Gem::Requirement
|
95
|
-
requirements:
|
96
|
-
- - "~>"
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: 0.14.9
|
99
|
-
type: :development
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - "~>"
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: 0.14.9
|
106
|
-
- !ruby/object:Gem::Dependency
|
107
|
-
name: coderay
|
108
|
-
requirement: !ruby/object:Gem::Requirement
|
109
|
-
requirements:
|
110
|
-
- - "~>"
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 1.1.1
|
113
|
-
type: :development
|
114
|
-
prerelease: false
|
115
|
-
version_requirements: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - "~>"
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: 1.1.1
|
120
|
-
- !ruby/object:Gem::Dependency
|
121
|
-
name: mocha
|
122
|
-
requirement: !ruby/object:Gem::Requirement
|
123
|
-
requirements:
|
124
|
-
- - "~>"
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: 0.13.0
|
127
|
-
type: :development
|
128
|
-
prerelease: false
|
129
|
-
version_requirements: !ruby/object:Gem::Requirement
|
130
|
-
requirements:
|
131
|
-
- - "~>"
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: 0.13.0
|
134
|
-
- !ruby/object:Gem::Dependency
|
135
|
-
name: rr
|
136
|
-
requirement: !ruby/object:Gem::Requirement
|
137
|
-
requirements:
|
138
|
-
- - "~>"
|
139
|
-
- !ruby/object:Gem::Version
|
140
|
-
version: 1.0.4
|
141
|
-
type: :development
|
142
|
-
prerelease: false
|
143
|
-
version_requirements: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
- - "~>"
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: 1.0.4
|
148
|
-
- !ruby/object:Gem::Dependency
|
149
|
-
name: flexmock
|
150
|
-
requirement: !ruby/object:Gem::Requirement
|
151
|
-
requirements:
|
152
|
-
- - "~>"
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 0.9.0
|
155
|
-
type: :development
|
156
|
-
prerelease: false
|
157
|
-
version_requirements: !ruby/object:Gem::Requirement
|
158
|
-
requirements:
|
159
|
-
- - "~>"
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
version: 0.9.0
|
162
|
-
- !ruby/object:Gem::Dependency
|
163
|
-
name: thread_order
|
164
|
-
requirement: !ruby/object:Gem::Requirement
|
165
|
-
requirements:
|
166
|
-
- - "~>"
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
version: 1.1.0
|
169
|
-
type: :development
|
170
|
-
prerelease: false
|
171
|
-
version_requirements: !ruby/object:Gem::Requirement
|
172
|
-
requirements:
|
173
|
-
- - "~>"
|
174
|
-
- !ruby/object:Gem::Version
|
175
|
-
version: 1.1.0
|
176
63
|
description: BDD for Ruby. RSpec runner and example groups.
|
177
64
|
email: rspec@googlegroups.com
|
178
65
|
executables:
|
@@ -266,7 +153,7 @@ licenses:
|
|
266
153
|
- MIT
|
267
154
|
metadata:
|
268
155
|
bug_tracker_uri: https://github.com/rspec/rspec-core/issues
|
269
|
-
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.13.
|
156
|
+
changelog_uri: https://github.com/rspec/rspec-core/blob/v3.13.3/Changelog.md
|
270
157
|
documentation_uri: https://rspec.info/documentation/
|
271
158
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
272
159
|
source_code_uri: https://github.com/rspec/rspec-core
|
@@ -285,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
172
|
- !ruby/object:Gem::Version
|
286
173
|
version: '0'
|
287
174
|
requirements: []
|
288
|
-
rubygems_version: 3.6.
|
175
|
+
rubygems_version: 3.6.2
|
289
176
|
specification_version: 4
|
290
|
-
summary: rspec-core-3.13.
|
177
|
+
summary: rspec-core-3.13.3
|
291
178
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|