rspec-rails 8.0.2 → 8.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f91cdd755050320a56d2b22f9a71dce0e3a08531bca816bfa46939fb95382e80
4
- data.tar.gz: 58b0416057f161a577a7d855217aca33e53afbba730eb7e785fcd7042300d8ae
3
+ metadata.gz: 8dae91953f55f6ae366fb831466405fb1d3a10e3f7ad01e3bd95303faa3c28c3
4
+ data.tar.gz: 402d869155202a2a934dbdf2ad16b23fda5ceed30d3ad862f0fae1a6f1ec8e7b
5
5
  SHA512:
6
- metadata.gz: 1257f664e0336b60421ac0823fed2a63ab9fedbb08133c48a133047c49b1360a8686fcba4d4537c69598dd9b2ce1ec6edd969840b020d8f245f38771be294e87
7
- data.tar.gz: 95a25f36d5bb3c1f669bedc0511eedfa461ff729162dcaecba2101e983921a1f2b4a053ef53c68fa43a12134b7b77b4df61746153ee157bb9cda348372754d2c
6
+ metadata.gz: 322a849e5d48bb29fa51a2861a18a65a2d295ac91bf8fcc0505a43df7d5d93ad90ef9701c4a07fb31a7f9e32973376a464ac8a5e9e782a6a4261b3046df82e47
7
+ data.tar.gz: 8194c19ad827a6e9e6484ac11da81c97a4d1000afce6faf2634fbe368997e737c708f9bade64f2196d26949d25d23836fadf693e0880d85f39029b5453a182c9
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ### Development
2
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v8.0.2...8-0-maintenance)
2
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v8.0.3...8-0-maintenance)
3
+
4
+ ### 8.0.3 / 2026-02-17
5
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v8.0.2...v8.0.3)
6
+
7
+ Bug Fixes:
8
+
9
+ * Fix insertion order of controller prefix in the view `lookup_context`. (Stephen Nelson, #2749)
10
+ * Ensure `rails stats` looks for specs using application root rather than working directory.
11
+ (Marvin Tangpos, #2879)
3
12
 
4
13
  ### 8.0.2 / 2025-08-12
5
14
  [Full Changelog](https://github.com/rspec/rspec-rails/compare/v8.0.1...v8.0.2)
data/README.md CHANGED
@@ -8,7 +8,14 @@ They’re also specifications (or _specs,_ for short):
8
8
  detailed explanations of how the application is supposed to behave,
9
9
  expressed in plain English.
10
10
 
11
- According to [RSpec Rails new versioning strategy][] use:
11
+ ## Supported Versions
12
+
13
+ We follow a versioning strategy as defined by [RSpec Rails versioning strategy][] the
14
+ TL;DR of which is that we support currently supported versions of Rails, and will
15
+ issue a major version change when removing older versions from support.
16
+
17
+ Accordingly you should use:
18
+
12
19
  * **[`rspec-rails` 8.x][]** for Rails 8.0 or 7.2.
13
20
  * **[`rspec-rails` 7.x][]** for Rails 7.x.
14
21
  * **[`rspec-rails` 6.x][]** for Rails 6.1, 7.0 or 7.1.
@@ -30,7 +37,7 @@ According to [RSpec Rails new versioning strategy][] use:
30
37
  [`rspec-rails` 6.x]: https://github.com/rspec/rspec-rails/tree/6-1-maintenance
31
38
  [`rspec-rails` 7.x]: https://github.com/rspec/rspec-rails/tree/7-1-maintenance
32
39
  [`rspec-rails` 8.x]: https://github.com/rspec/rspec-rails/tree/8-0-maintenance
33
- [RSpec Rails new versioning strategy]: https://github.com/rspec/rspec-rails/blob/main/rfcs/versioning-strategy.md
40
+ [RSpec Rails versioning strategy]: https://github.com/rspec/rspec-rails/blob/main/rfcs/versioning-strategy.md
34
41
 
35
42
  ## Installation
36
43
 
@@ -77,7 +77,7 @@ RSpec.configure do |config|
77
77
  # The different available types are documented in the features, such as in
78
78
  # https://rspec.info/features/8-0/rspec-rails
79
79
  #
80
- # You can also this infer these behaviours automatically by location, e.g.
80
+ # You can also infer these behaviours automatically by location, e.g.
81
81
  # /spec/models would pull in the same behaviour as `type: :model` but this
82
82
  # behaviour is considered legacy and will be removed in a future version.
83
83
  #
@@ -186,7 +186,7 @@ module RSpec
186
186
 
187
187
  before do
188
188
  _include_controller_helpers
189
- view.lookup_context.prefixes << _controller_path
189
+ view.lookup_context.prefixes.prepend(_controller_path)
190
190
 
191
191
  controller.controller_path = _controller_path
192
192
 
@@ -91,7 +91,7 @@ module RSpec
91
91
 
92
92
  def sent_emails_message
93
93
  if @diff.empty?
94
- "\n\nThere were no any emails sent inside the expectation block."
94
+ "\n\nThere were no emails sent inside the expectation block."
95
95
  else
96
96
  sent_emails =
97
97
  @diff.map do |email|
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec Rails.
4
4
  module Version
5
5
  # Current version of RSpec Rails, in semantic versioning format.
6
- STRING = '8.0.2'
6
+ STRING = '8.0.3'
7
7
  end
8
8
  end
9
9
  end
data/lib/rspec-rails.rb CHANGED
@@ -12,17 +12,19 @@ module RSpec
12
12
 
13
13
  # As of Rails 8.0.0 you can register directories to work with `rails stats`
14
14
  if ::Rails::VERSION::STRING >= "8.0.0"
15
- require 'rails/code_statistics'
16
-
17
- dirs = Dir['./spec/**/*_spec.rb']
18
- .map { |f| f.sub(/^\.\/(spec\/\w+)\/.*/, '\\1') }
19
- .uniq
20
- .select { |f| File.directory?(f) }
21
-
22
- Hash[dirs.map { |d| [d.split('/').last, d] }].each do |type, dir|
23
- name = type.singularize.capitalize
24
-
25
- ::Rails::CodeStatistics.register_directory "#{name} specs", dir, test_directory: true
15
+ initializer "rspec_rails.code_statistics" do
16
+ require 'rails/code_statistics'
17
+
18
+ root = ::Rails.root
19
+ dirs = Dir[root.join('spec', '**', '*_spec.rb').to_s]
20
+ .map { |f| f.sub(%r{^#{Regexp.escape(root.to_s)}/(spec/\w+)/.*}, '\\1') }
21
+ .uniq
22
+ .select { |f| File.directory?(root.join(f)) }
23
+
24
+ Hash[dirs.map { |d| [d.split('/').last, d] }].each do |type, dir|
25
+ name = type.singularize.capitalize
26
+ ::Rails::CodeStatistics.register_directory "#{name} specs", root.join(dir).to_s, test_directory: true
27
+ end
26
28
  end
27
29
  end
28
30
 
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: 8.0.2
4
+ version: 8.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Chelimsky
@@ -10,11 +10,11 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIFvjCCA6agAwIBAgIJAPXjfUbCjdXVMA0GCSqGSIb3DQEBCwUAMIGAMQswCQYD
13
+ MIIFvjCCA6agAwIBAgIJAPXjfUbCjdXWMA0GCSqGSIb3DQEBCwUAMIGAMQswCQYD
14
14
  VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEO
15
15
  MAwGA1UECgwFUlNwZWMxEzARBgNVBAMMCnJzcGVjLmluZm8xJTAjBgkqhkiG9w0B
16
- CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMjUwMjA2MTE0NjU2WhcNMjYw
17
- MjA2MTE0NjU2WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
16
+ CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMjYwMjE3MTE0ODM0WhcNMjcw
17
+ MjE3MTE0ODM0WjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
18
18
  EDAOBgNVBAcMB1NlYXR0bGUxDjAMBgNVBAoMBVJTcGVjMRMwEQYDVQQDDApyc3Bl
19
19
  Yy5pbmZvMSUwIwYJKoZIhvcNAQkBFhZyc3BlY0Bnb29nbGVncm91cHMuY29tMIIC
20
20
  IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsSmjgcHaKlD0jizRJowi2bGI
@@ -30,17 +30,17 @@ cert_chain:
30
30
  gp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8GKjJlmVtzEIqZ
35
+ TvBLO5zQwR4cWIrg0NWjkDOSQOrNNQ2Degv/aOFrR8dFPJSgxZG/IC0/t6s72cEt
36
+ V4SIe/NLIU4RyBzfgn/RBsalDEF1yIVlDWspMa78clS3bPmntkNyfLwIUwINDHhn
37
+ swFA8bEKMQWqRlupuRmEiy3nGe6az46YlPXzK5UWfXJ6Lb1wIE8W80TRx0HpSC7j
38
+ JfXPfQ0PLgiU4nnQqain2bIn96Ooco8kspeqp8rSJ8sbaMPTNmcFuwD3gzWsRnJ3
39
+ rIaJbmrUcq6DlJ7jfv3u5TPt4JWzDP7oDPf3nXNiF2Cn48Ne598G5lHH6Heyxe39
40
+ pYZdhEptKJWPHxbJWHXD02omKprkNuQKHpnXrW+mmbiO4IcqAMggiud+DaEQg20x
41
+ Dae4cNbvK5p3D+5xqvcEO2G4uCMDmJjrSd61kvTLBnm1qroHqrpi9GauEVWZZmD0
42
+ n0ph8oFAXOsKQWxZ+4uh6yGISk+WhngCZEVPZUjq7SIGAuVhQy2ZgwdjnLEz//lD
43
+ x0Qexp5yGeoxAL9qKM/RXYKtuRZBJV1z+L9A1YOtwaXXNg==
44
44
  -----END CERTIFICATE-----
45
45
  date: 1980-01-02 00:00:00.000000000 Z
46
46
  dependencies:
@@ -297,7 +297,7 @@ licenses:
297
297
  - MIT
298
298
  metadata:
299
299
  bug_tracker_uri: https://github.com/rspec/rspec-rails/issues
300
- changelog_uri: https://github.com/rspec/rspec-rails/blob/v8.0.2/Changelog.md
300
+ changelog_uri: https://github.com/rspec/rspec-rails/blob/v8.0.3/Changelog.md
301
301
  documentation_uri: https://rspec.info/documentation/
302
302
  mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
303
303
  source_code_uri: https://github.com/rspec/rspec-rails
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  - !ruby/object:Gem::Version
317
317
  version: '0'
318
318
  requirements: []
319
- rubygems_version: 3.6.7
319
+ rubygems_version: 4.0.3
320
320
  specification_version: 4
321
321
  summary: RSpec for Rails
322
322
  test_files: []
metadata.gz.sig CHANGED
Binary file