rspec-rails 6.1.0 → 6.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4670e0b41ea2e22cb7a3fd5d28a421fe82fed0c591dbb245e011b497a1ac81f3
4
- data.tar.gz: a3cf937f37a03c114b8397216d034eae1645ea8575906f6f5a444973a1626419
3
+ metadata.gz: 3754c96bcbfa8f8685aed3416c1923bf19b2f78610241c4e01d16a7a5425e0db
4
+ data.tar.gz: 72c02a8443b6410da61768369f1ac53fabcd6cd2fd9efeca36a1c5033ce4f430
5
5
  SHA512:
6
- metadata.gz: dd476082c87a5735996ce66d0efcf7bb1f5860b81118e05b71388872b50a11bb28d6fb981a23aed71597c45585244aa4c5d53a45c6d8500a751e36fa8d4f3039
7
- data.tar.gz: b996549661e01669b60767064e24b7dd7836ce79db985048856d7c98c9ed5892d04551050dbaa3727c2a358026990611559144c824f198a85b7c78c3651e3401
6
+ metadata.gz: 879fba62ac81954bd7d2428cf356b32530e50a4eabc57137d903162ebdde1c395036da6568cb91765d6b5eeb8a5544bfe8a70e78f6520de897b5676f23c6a6cd
7
+ data.tar.gz: 7f3ce35fe10aaa8ec773b5515a607867a9a4a7dc8b57a98773411dd9b1434ec4583d723d99afe56b13968f7ddd3a8fa6fd404469e9ee9454eb243b38c1e381b5
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,5 +1,22 @@
1
1
  ### Development
2
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.4...main)
2
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.1.1...6-1-maintenance)
3
+
4
+ ### 6.1.2 / 2024-03-19
5
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.1.1...v6.1.2)
6
+
7
+ Bug Fixes:
8
+
9
+ * Fix generated mailer paths to match Rails convention. (Patrício dos Santos, #2735)
10
+ * Fix class in template for generator specs. (Nicolas Buduroi, #2744)
11
+
12
+ ### 6.1.1 / 2024-01-25
13
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.1.0...v6.1.1)
14
+
15
+ Bug Fixes:
16
+
17
+ * Improved deprecation message for `RSpec::Rails::Configuration.fixture_paths`
18
+ (Benoit Tigeot, #2720)
19
+ * Fix support for namespaced fixtures in Rails 7.1. (Benedikt Deicke, #2716)
3
20
 
4
21
  ### 6.1.0 / 2023-11-21
5
22
  [Full Changelog](https://github.com/rspec/rspec-rails/compare/v6.0.4...v6.1.0)
@@ -172,7 +189,7 @@ Enhancements:
172
189
  (Eloy Espinaco, Luka Lüdicke, #2355, #2356, #2378)
173
190
  * Generated scaffold now includes engine route helpers when inside a mountable engine.
174
191
  (Andrew W. Lee, #2372)
175
- * Improve request spec "controller" scafold when no action is specified.
192
+ * Improve request spec "controller" scaffold when no action is specified.
176
193
  (Thomas Hareau, #2399)
177
194
  * Introduce testing snippets concept (Phil Pirozhkov, Benoit Tigeot, #2423)
178
195
  * Prevent collisions with `let(:name)` for Rails 6.1 and `let(:method_name)` on older
@@ -575,7 +592,7 @@ Enhancements:
575
592
  * Add support for PATCH to route specs created via scaffold. (Igor Zubkov, #1336)
576
593
  * Improve controller and routing spec calls to `routes` by using `yield`
577
594
  instead of `call`. (Anton Davydov, #1308)
578
- * Add support for `ActiveJob` specs as standard `RSpec::Rails::RailsExampleGoup`s
595
+ * Add support for `ActiveJob` specs as standard `RSpec::Rails::RailsExampleGroup`s
579
596
  via both `type: :job` and inferring type from spec directory `spec/jobs`.
580
597
  (Gabe Martin-Dempesy, #1361)
581
598
  * Include `RSpec::Rails::FixtureSupport` into example groups using metadata
@@ -4,7 +4,7 @@ module Rspec
4
4
  module Generators
5
5
  # @private
6
6
  class GeneratorGenerator < Base
7
- class_option :generator_specs, type: :boolean, default: true, desc: "Generate generator specs"
7
+ class_option :generator_specs, type: :boolean, default: true, desc: 'Generate generator specs'
8
8
 
9
9
  def generate_generator_spec
10
10
  return unless options[:generator_specs]
@@ -17,7 +17,7 @@ module Rspec
17
17
  end
18
18
 
19
19
  def filename
20
- "#{table_name}_generator_spec.rb"
20
+ "#{file_name}_generator_spec.rb"
21
21
  end
22
22
  end
23
23
  end
@@ -1,6 +1,5 @@
1
1
  require 'rails_helper'
2
2
 
3
- RSpec.describe "<%= class_name.pluralize %>", <%= type_metatag(:generator) %> do
4
-
3
+ RSpec.describe "<%= class_name %>Generator", <%= type_metatag(:generator) %> do
5
4
  pending "add some scenarios (or delete) #{__FILE__}"
6
5
  end
@@ -8,7 +8,8 @@ module Rspec
8
8
  argument :actions, type: :array, default: [], banner: "method method"
9
9
 
10
10
  def generate_mailer_spec
11
- template "mailer_spec.rb", target_path('mailers', class_path, "#{file_name}_spec.rb")
11
+ file_suffix = file_name.end_with?('mailer') ? 'spec.rb' : 'mailer_spec.rb'
12
+ template "mailer_spec.rb", target_path('mailers', class_path, [file_name, file_suffix].join('_'))
12
13
  end
13
14
 
14
15
  def generate_fixtures_files
@@ -21,7 +22,8 @@ module Rspec
21
22
  def generate_preview_files
22
23
  return unless RSpec::Rails::FeatureCheck.has_action_mailer_preview?
23
24
 
24
- template "preview.rb", target_path("mailers/previews", class_path, "#{file_name}_preview.rb")
25
+ file_suffix = file_name.end_with?('mailer') ? 'preview.rb' : 'mailer_preview.rb'
26
+ template "preview.rb", target_path("mailers/previews", class_path, [file_name, file_suffix].join('_'))
25
27
  end
26
28
  end
27
29
  end
@@ -1,6 +1,6 @@
1
1
  <% module_namespacing do -%>
2
2
  # Preview all emails at http://localhost:3000/rails/mailers/<%= file_path %>
3
- class <%= class_name %>Preview < ActionMailer::Preview
3
+ class <%= class_name %><%= 'Mailer' unless class_name.end_with?('Mailer') %>Preview < ActionMailer::Preview
4
4
  <% actions.each do |action| -%>
5
5
 
6
6
  # Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %>
@@ -170,7 +170,8 @@ module RSpec
170
170
  RSpec.deprecate(
171
171
  "config.fixture_path",
172
172
  replacement: "config.fixture_paths",
173
- message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array"
173
+ message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \
174
+ "You should migrate to plural:"
174
175
  )
175
176
  fixture_paths&.first
176
177
  end
@@ -179,7 +180,8 @@ module RSpec
179
180
  RSpec.deprecate(
180
181
  "config.fixture_path = #{path.inspect}",
181
182
  replacement: "config.fixture_paths = [#{path.inspect}]",
182
- message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array"
183
+ message: "Rails 7.1 has deprecated the singular fixture_path in favour of an array." \
184
+ "You should migrate to plural:"
183
185
  )
184
186
  self.fixture_paths = Array(path)
185
187
  end
@@ -69,7 +69,7 @@ module RSpec
69
69
  #
70
70
  # @param message [Hash, Mail::Message] a mail message or hash of
71
71
  # attributes used to build one
72
- # @return [ActionMaibox::InboundMessage]
72
+ # @return [ActionMailbox::InboundMessage]
73
73
  def process(message)
74
74
  MailboxExampleGroup.create_inbound_email(message).tap do |mail|
75
75
  self.class.mailbox_class.receive(mail)
@@ -1,5 +1,3 @@
1
- require "action_dispatch/testing/assertions/routing"
2
-
3
1
  module RSpec
4
2
  module Rails
5
3
  # @private
@@ -43,14 +43,14 @@ module RSpec
43
43
  if ::Rails.version.to_f >= 7.1
44
44
  def fixtures(*args)
45
45
  super.tap do
46
- fixture_sets.each_key do |fixture_name|
47
- proxy_method_warning_if_called_in_before_context_scope(fixture_name)
46
+ fixture_sets.each_pair do |method_name, fixture_name|
47
+ proxy_method_warning_if_called_in_before_context_scope(method_name, fixture_name)
48
48
  end
49
49
  end
50
50
  end
51
51
 
52
- def proxy_method_warning_if_called_in_before_context_scope(fixture_name)
53
- define_method(fixture_name) do |*args, **kwargs, &blk|
52
+ def proxy_method_warning_if_called_in_before_context_scope(method_name, fixture_name)
53
+ define_method(method_name) do |*args, **kwargs, &blk|
54
54
  if RSpec.current_scope == :before_context_hook
55
55
  RSpec.warn_with("Calling fixture method in before :context ")
56
56
  else
@@ -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 = '6.1.0'
6
+ STRING = '6.1.2'
7
7
  end
8
8
  end
9
9
  end
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.1.0
4
+ version: 6.1.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: 2023-11-21 00:00:00.000000000 Z
47
+ date: 2024-03-18 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.12'
97
+ version: '3.13'
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.12'
104
+ version: '3.13'
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.12'
111
+ version: '3.13'
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.12'
118
+ version: '3.13'
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.12'
125
+ version: '3.13'
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.12'
132
+ version: '3.13'
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.12'
139
+ version: '3.13'
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.12'
146
+ version: '3.13'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: ammeter
149
149
  requirement: !ruby/object:Gem::Requirement
@@ -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/v6.1.0/Changelog.md
300
+ changelog_uri: https://github.com/rspec/rspec-rails/blob/v6.1.2/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
@@ -317,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
317
  - !ruby/object:Gem::Version
318
318
  version: '0'
319
319
  requirements: []
320
- rubygems_version: 3.4.10
320
+ rubygems_version: 3.5.6
321
321
  signing_key:
322
322
  specification_version: 4
323
323
  summary: RSpec for Rails
metadata.gz.sig CHANGED
Binary file