rspec-rails 6.0.1 → 6.0.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 +15 -3
- data/README.md +29 -31
- data/lib/generators/rspec/install/templates/spec/rails_helper.rb +1 -1
- data/lib/rspec/rails/fixture_support.rb +6 -1
- data/lib/rspec/rails/matchers/active_job.rb +3 -3
- data/lib/rspec/rails/version.rb +1 -1
- data/lib/rspec/rails/view_rendering.rb +11 -3
- data.tar.gz.sig +0 -0
- metadata +11 -11
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cc4960b18d7043396b3d315d96dc7646ba74726e3300792f014426b45223294
|
4
|
+
data.tar.gz: 571e7d23f8907eddb31b5bf31a84b2e08446b4fa47720fffe824def4ffad7256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de670f309abdc64066d5e813ae24df0729ad37277646092c696ac8c2f87ad173bbd6c37f89b46870a8f03cb1ba1eed72e58e06f98503f92841f7a106faf92474
|
7
|
+
data.tar.gz: 04eee3afe0bd756a9098faa0593b9761f99582d32d39f024dcf61d461075eda49b121230918f5bc994004d7fbd7bdb4d70049fc784e859b595ece7d18816266e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,15 +1,27 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.
|
2
|
+
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.2...6-0-maintenance)
|
3
|
+
|
4
|
+
### 6.0.2 / 2023-05-04
|
5
|
+
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.1...v6.0.2)
|
6
|
+
|
7
|
+
Bug Fixes:
|
8
|
+
|
9
|
+
* Fix ActionView::PathSet when `render_views` is off for Rails 7.1.
|
10
|
+
(Eugene Kenny, Iliana, #2631)
|
11
|
+
* Support Rails 7.1's `#fixtures_paths` in example groups (removes a deprecation warning).
|
12
|
+
(Nicholas Simmons, #2664)
|
13
|
+
* Fix `have_enqueued_job` to properly detect enqueued jobs when other jobs were
|
14
|
+
performed inside the expectation block. (Slava Kardakov, Phil Pirozhkov, #2573)
|
3
15
|
|
4
16
|
### 6.0.1 / 2022-10-18
|
5
|
-
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.0...
|
17
|
+
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.0...v6.0.1)
|
6
18
|
|
7
19
|
Bug Fixes:
|
8
20
|
|
9
21
|
* Prevent tagged logged support in Rails 7 calling `#name`. (Jon Rowe, #2625)
|
10
22
|
|
11
23
|
### 6.0.0 / 2022-10-10
|
12
|
-
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v5.1.2...
|
24
|
+
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v5.1.2...v6.0.0)
|
13
25
|
|
14
26
|
Enhancements:
|
15
27
|
|
data/README.md
CHANGED
@@ -15,8 +15,6 @@ According to [RSpec Rails new versioning strategy][] use:
|
|
15
15
|
* **[`rspec-rails` 3.x][]** for Rails earlier than 5.0.
|
16
16
|
* **[`rspec-rails` 1.x][]** for Rails 2.x.
|
17
17
|
|
18
|
-
[Build Status]: https://secure.travis-ci.org/rspec/rspec-rails.svg?branch=main
|
19
|
-
[travis-ci]: https://travis-ci.org/rspec/rspec-rails
|
20
18
|
[Code Climate]: https://codeclimate.com/github/rspec/rspec-rails.svg
|
21
19
|
[code-climate]: https://codeclimate.com/github/rspec/rspec-rails
|
22
20
|
[Gem Version]: https://badge.fury.io/rb/rspec-rails.svg
|
@@ -88,8 +86,8 @@ read the [`rspec-rails` upgrade notes][] to find out what to watch out for.
|
|
88
86
|
|
89
87
|
Be sure to check the general [RSpec upgrade notes][] as well.
|
90
88
|
|
91
|
-
[`rspec-rails` upgrade notes]: https://
|
92
|
-
[RSpec upgrade notes]: https://
|
89
|
+
[`rspec-rails` upgrade notes]: https://rspec.info/features/6-0/rspec-rails/upgrade
|
90
|
+
[RSpec upgrade notes]: https://rspec.info/upgrading-from-rspec-2/
|
93
91
|
|
94
92
|
## Usage
|
95
93
|
|
@@ -183,7 +181,7 @@ rspec ./spec/models/post_spec.rb:3 # Post before publication cannot have comment
|
|
183
181
|
For an in-depth look at the RSpec DSL, including lots of examples,
|
184
182
|
read the official Cucumber documentation for [RSpec Core][].
|
185
183
|
|
186
|
-
[RSpec Core]: https://
|
184
|
+
[RSpec Core]: https://rspec.info/features/3-12/rspec-core
|
187
185
|
|
188
186
|
### Helpful Rails Matchers
|
189
187
|
|
@@ -209,23 +207,23 @@ to test the various parts of a Rails system:
|
|
209
207
|
|
210
208
|
Follow the links above for examples of how each matcher is used.
|
211
209
|
|
212
|
-
[the matchers that come standard in RSpec]: https://
|
213
|
-
[`be_a_new`]: https://
|
214
|
-
[`render_template`]: https://
|
215
|
-
[`redirect_to`]: https://
|
216
|
-
[`route_to`]: https://
|
217
|
-
[`be_routable`]: https://
|
218
|
-
[`have_http_status`]: https://
|
219
|
-
[`match_array`]: https://
|
220
|
-
[`have_been_enqueued`]: https://
|
221
|
-
[`have_enqueued_job`]: https://
|
210
|
+
[the matchers that come standard in RSpec]: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers
|
211
|
+
[`be_a_new`]: https://rspec.info/features/6-0/rspec-rails/matchers/new-record-matcher
|
212
|
+
[`render_template`]: https://rspec.info/features/6-0/rspec-rails/matchers/render-template-matcher
|
213
|
+
[`redirect_to`]: https://rspec.info/features/6-0/rspec-rails/matchers/redirect-to-matcher
|
214
|
+
[`route_to`]: https://rspec.info/features/6-0/rspec-rails/routing-specs/route-to-matcher
|
215
|
+
[`be_routable`]: https://rspec.info/features/6-0/rspec-rails/routing-specs/be-routable-matcher
|
216
|
+
[`have_http_status`]: https://rspec.info/features/6-0/rspec-rails/matchers/have-http-status-matcher
|
217
|
+
[`match_array`]: https://rspec.info/features/6-0/rspec-rails/matchers/relation-match-array
|
218
|
+
[`have_been_enqueued`]: https://rspec.info/features/6-0/rspec-rails/matchers/have-been-enqueued-matcher
|
219
|
+
[`have_enqueued_job`]: https://rspec.info/features/6-0/rspec-rails/matchers/have-enqueued-job-matcher
|
222
220
|
|
223
221
|
### What else does RSpec Rails add?
|
224
222
|
|
225
223
|
For a comprehensive look at RSpec Rails’ features,
|
226
224
|
read the [official Cucumber documentation][].
|
227
225
|
|
228
|
-
[official Cucumber documentation]: https://
|
226
|
+
[official Cucumber documentation]: https://rspec.info/features/6-0/rspec-rails
|
229
227
|
|
230
228
|
## What tests should I write?
|
231
229
|
|
@@ -270,20 +268,20 @@ RSpec.describe User, type: :model do
|
|
270
268
|
...
|
271
269
|
```
|
272
270
|
|
273
|
-
[request]: https://
|
274
|
-
[feature]: https://
|
275
|
-
[system]: https://
|
276
|
-
[model]: https://
|
277
|
-
[controller]: https://
|
278
|
-
[mailer]: https://
|
279
|
-
[job]: https://
|
280
|
-
[view]: https://
|
281
|
-
[routing]: https://
|
282
|
-
[helper]: https://
|
271
|
+
[request]: https://rspec.info/features/6-0/rspec-rails/request-specs/request-spec
|
272
|
+
[feature]: https://rspec.info/features/6-0/rspec-rails/feature-specs/feature-spec
|
273
|
+
[system]: https://rspec.info/features/6-0/rspec-rails/system-specs/system-specs
|
274
|
+
[model]: https://rspec.info/features/6-0/rspec-rails/model-specs
|
275
|
+
[controller]: https://rspec.info/features/6-0/rspec-rails/controller-specs
|
276
|
+
[mailer]: https://rspec.info/features/6-0/rspec-rails/mailer-specs
|
277
|
+
[job]: https://rspec.info/features/6-0/rspec-rails/job-specs/job-spec
|
278
|
+
[view]: https://rspec.info/features/6-0/rspec-rails/view-specs/view-spec
|
279
|
+
[routing]: https://rspec.info/features/6-0/rspec-rails/routing-specs
|
280
|
+
[helper]: https://rspec.info/features/6-0/rspec-rails/helper-specs/helper-spec
|
283
281
|
[`ActionDispatch::IntegrationTest`]: https://api.rubyonrails.org/classes/ActionDispatch/IntegrationTest.html
|
284
282
|
[`ActionDispatch::SystemTestCase`]: https://api.rubyonrails.org/classes/ActionDispatch/SystemTestCase.html
|
285
283
|
[`ActionController::TestCase`]: https://api.rubyonrails.org/classes/ActionController/TestCase.html
|
286
|
-
[in the appropriate folder]: https://
|
284
|
+
[in the appropriate folder]: https://rspec.info/features/6-0/rspec-rails/directory-structure
|
287
285
|
|
288
286
|
### System specs, feature specs, request specs–what’s the difference?
|
289
287
|
|
@@ -366,10 +364,10 @@ you can run the specs and Cucumber features, or submit a pull request.
|
|
366
364
|
|
367
365
|
### RSpec base libraries
|
368
366
|
|
369
|
-
*
|
370
|
-
*
|
371
|
-
*
|
372
|
-
*
|
367
|
+
* https://github.com/rspec/rspec
|
368
|
+
* https://github.com/rspec/rspec-core
|
369
|
+
* https://github.com/rspec/rspec-expectations
|
370
|
+
* https://github.com/rspec/rspec-mocks
|
373
371
|
|
374
372
|
### Recommended third-party extensions
|
375
373
|
|
@@ -68,7 +68,7 @@ RSpec.configure do |config|
|
|
68
68
|
# end
|
69
69
|
#
|
70
70
|
# The different available types are documented in the features, such as in
|
71
|
-
# https://
|
71
|
+
# https://rspec.info/features/6-0/rspec-rails
|
72
72
|
config.infer_spec_type_from_file_location!
|
73
73
|
|
74
74
|
# Filter lines from Rails gems in backtraces.
|
@@ -21,7 +21,12 @@ module RSpec
|
|
21
21
|
if RSpec.configuration.use_active_record?
|
22
22
|
include Fixtures
|
23
23
|
|
24
|
-
|
24
|
+
# TestFixtures#fixture_path is deprecated and will be removed in Rails 7.2
|
25
|
+
if respond_to?(:fixture_paths=)
|
26
|
+
fixture_paths << RSpec.configuration.fixture_path
|
27
|
+
else
|
28
|
+
self.fixture_path = RSpec.configuration.fixture_path
|
29
|
+
end
|
25
30
|
self.use_transactional_tests = RSpec.configuration.use_transactional_fixtures
|
26
31
|
self.use_instantiated_fixtures = RSpec.configuration.use_instantiated_fixtures
|
27
32
|
|
@@ -230,11 +230,11 @@ module RSpec
|
|
230
230
|
def matches?(proc)
|
231
231
|
raise ArgumentError, "have_enqueued_job and enqueue_job only support block expectations" unless Proc === proc
|
232
232
|
|
233
|
-
|
233
|
+
original_enqueued_jobs = Set.new(queue_adapter.enqueued_jobs)
|
234
234
|
proc.call
|
235
|
-
|
235
|
+
enqueued_jobs = Set.new(queue_adapter.enqueued_jobs)
|
236
236
|
|
237
|
-
check(
|
237
|
+
check(enqueued_jobs - original_enqueued_jobs)
|
238
238
|
end
|
239
239
|
|
240
240
|
def does_not_match?(proc)
|
data/lib/rspec/rails/version.rb
CHANGED
@@ -71,7 +71,15 @@ module RSpec
|
|
71
71
|
# templates with modified source
|
72
72
|
#
|
73
73
|
# @private
|
74
|
-
class ResolverDecorator
|
74
|
+
class ResolverDecorator < ::ActionView::Resolver
|
75
|
+
(::ActionView::Resolver.instance_methods - Object.instance_methods).each do |method|
|
76
|
+
undef_method method
|
77
|
+
end
|
78
|
+
|
79
|
+
(::ActionView::Resolver.methods - Object.methods).each do |method|
|
80
|
+
singleton_class.undef_method method
|
81
|
+
end
|
82
|
+
|
75
83
|
def initialize(resolver)
|
76
84
|
@resolver = resolver
|
77
85
|
end
|
@@ -119,11 +127,11 @@ module RSpec
|
|
119
127
|
# @private
|
120
128
|
module EmptyTemplates
|
121
129
|
def prepend_view_path(new_path)
|
122
|
-
|
130
|
+
super(_path_decorator(*new_path))
|
123
131
|
end
|
124
132
|
|
125
133
|
def append_view_path(new_path)
|
126
|
-
|
134
|
+
super(_path_decorator(*new_path))
|
127
135
|
end
|
128
136
|
|
129
137
|
private
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Chelimsky
|
@@ -44,7 +44,7 @@ cert_chain:
|
|
44
44
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
45
45
|
F3MdtaDehhjC
|
46
46
|
-----END CERTIFICATE-----
|
47
|
-
date:
|
47
|
+
date: 2023-05-04 00:00:00.000000000 Z
|
48
48
|
dependencies:
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: actionpack
|
@@ -94,56 +94,56 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '3.
|
97
|
+
version: '3.12'
|
98
98
|
type: :runtime
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '3.
|
104
|
+
version: '3.12'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: rspec-expectations
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '3.
|
111
|
+
version: '3.12'
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
114
|
version_requirements: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '3.
|
118
|
+
version: '3.12'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
120
|
name: rspec-mocks
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '3.
|
125
|
+
version: '3.12'
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '3.
|
132
|
+
version: '3.12'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rspec-support
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '3.
|
139
|
+
version: '3.12'
|
140
140
|
type: :runtime
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: '3.
|
146
|
+
version: '3.12'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
148
|
name: ammeter
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
@@ -296,7 +296,7 @@ licenses:
|
|
296
296
|
- MIT
|
297
297
|
metadata:
|
298
298
|
bug_tracker_uri: https://github.com/rspec/rspec-rails/issues
|
299
|
-
changelog_uri: https://github.com/rspec/rspec-rails/blob/v6.0.
|
299
|
+
changelog_uri: https://github.com/rspec/rspec-rails/blob/v6.0.2/Changelog.md
|
300
300
|
documentation_uri: https://rspec.info/documentation/
|
301
301
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
302
302
|
source_code_uri: https://github.com/rspec/rspec-rails
|
metadata.gz.sig
CHANGED
Binary file
|