rspec-rails 4.0.0 → 4.0.1

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: 8e8f5dabd4f5335dc409c77670d7aef552636874486111f105613d54e4270375
4
- data.tar.gz: 72f211f8667a1d6faedaa8e02877958ccd742c5591107ed568a620fc38999c55
3
+ metadata.gz: 2c2f416b4c35d73ddb041ca9781a14bf6b8a312404977c54b23539a707605f23
4
+ data.tar.gz: 3d1c40b0b8044843dccc25a1915cfc97aa48129704a3d37a8a951af66af5fd0f
5
5
  SHA512:
6
- metadata.gz: a4125a040fcc9d7b1e9d8ee802f2d9ad75bc581a3e9263c329db8ddaccfd49988ccaab066c0aebad50e3b78a99d0ebe22e04a9648e44f6e1284325ea112e4c63
7
- data.tar.gz: e08c9439828c7f1b2f3ec543ea72d554f92d79adde6cb01e19d8486c3fc64887432239d1159d4aea7a6b8811cd4f3aaff811b777b3dff80569facfaa38ede625
6
+ metadata.gz: 16c3d14684c86581f8933e4886e79e17554fb5a6306b6f8c798bd22347c7193bd2bf68d62f28b93d73a7b64df279202453f3d6bc15bac14da48c57f303d5c83d
7
+ data.tar.gz: 3ad8ffb06ea47224800cd7ce668d6d731c8495aeeaf8922cf2ca3327bd25084b1bd8083f830a9b28c68be4192c007b00aec7132bd1d212e3d847c1413d2d06e3
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,50 +1,24 @@
1
- ### 4.0.0.rc1 / 2020-03-13
2
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.0.beta4...v4.0.0.rc1)
1
+ ### Development
2
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.1...4-0-development)
3
3
 
4
- Enhancements:
5
-
6
- * Allow `ActiveJob` matchers `#on_queue` modifier to take symbolic queue names. (Nils Sommer, #2283)
7
- * The scaffold generator now generates request specs in preference to controller specs.
8
- (Luka Lüdicke, #2288)
9
- * Add configuration option to disable ActiveRecord. (Jon Rowe, Phil Pirozhkov, Hermann Mayer, #2266)
10
- * Set `ActionDispatch::SystemTesting::Server.silence_puma = true` when running system specs.
11
- (ta1kt0me, Benoit Tigeot, #2289)
4
+ ### 4.0.1 / 2020-05-16
5
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.0...v4.0.1)
12
6
 
13
7
  Bug Fixes:
14
8
 
15
- * Restore previous conditional check for setting `default_url_options` in feature
16
- specs, prevents a `NoMethodError` in some scenarios. (Eugene Kenny, #2277)
17
- * Allow changing `ActiveJob::Base.queue_adapter` inside a system spec.
18
- (Jonathan Rochkind, #2242)
19
- * `rails generate generator` command now creates related spec file (Joel Azemar, #2217)
20
- * Relax upper `capybara` version constraint to allow for Capybara 3.x (Phil Pirozhkov, #2281)
21
- * Clear ActionMailer test mailbox after each example (Benoit Tigeot, #2293)
9
+ * Remove warning when calling `driven_by` in system specs. (Aubin Lorieux, #2302)
10
+ * Fix comparison of times for `#at` in job matchers. (Jon Rowe, Markus Doits, #2304)
11
+ * Allow `have_enqueued_mail` to match when a sub class of `ActionMailer::DeliveryJob`
12
+ is set using `<Class>.delivery_job=`. (Atsushi Yoshida #2305)
13
+ * Restore Ruby 2.2.x compatibility. (Jon Rowe, #2332)
14
+ * Add `required_ruby_version` to gem spec. (Marc-André Lafortune, #2319, #2338)
22
15
 
23
- ### 4.0.0.beta4
24
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.0.beta3...v4.0.0.beta4)
25
-
26
- Enhancements:
27
-
28
- * Add argument matcher support to `have_enqueued_*` matchers. (Phil Pirozhkov, #2206)
29
- * Switch generated templates to use ruby 1.9 hash keys. (Tanbir Hasan, #2224)
30
- * Add `have_been_performed`/`have_performed_job`/`perform_job` ActiveJob
31
- matchers (Isaac Seymour, #1785)
32
- * Default to generating request specs rather than controller specs when
33
- generating a controller (Luka Lüdicke, #2222)
34
-
35
- Bug Fixes:
36
-
37
- * Prevent `driven_by(:selenium)` being called due to hook precedence.
38
- (Takumi Shotoku, #2188)
39
- * Prevent a `WrongScopeError` being thrown during loading fixtures on Rails
40
- 6.1 development version. (Edouard Chin, #2215)
41
- * Fix Mocha mocking support with `should`. (Phil Pirozhkov, #2256)
42
-
43
- ### 4.0.0.beta3
44
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.0.beta2...v4.0.0.beta3)
16
+ ### 4.0.0 / 2020-03-24
17
+ [Full Changelog](https://github.com/rspec/rspec-rails/compare/v3.9.1...v4.0.0)
45
18
 
46
19
  Enhancements:
47
20
 
21
+ * Adds support for Rails 6. (Penelope Phippen, Benoit Tigeot, Jon Rowe, #2071)
48
22
  * Adds support for JRuby on Rails 5.2 and 6
49
23
  * Add support for parameterised mailers (Ignatius Reza, #2125)
50
24
  * Add ActionMailbox spec helpers and test type (James Dabbs, #2119)
@@ -55,28 +29,18 @@ Enhancements:
55
29
  * Improve path parsing in view specs render options. (John Hawthorn, #2115)
56
30
  * Add routing spec template as an option for generating controller specs.
57
31
  (David Revelo, #2134)
58
-
59
- Bug Fixes:
60
-
61
- * Replace `before_teardown` as well as `after_teardown` to ensure screenshots
62
- are generated correctly. (Jon Rowe, #2164)
63
- * `ActionView::FixtureResolver#hash` has been renamed to `ActionView::FixtureResolver#data`.
64
- (Penelope Phippen, #2076)
65
- * Add missing require for `have_enqueued_mail` matcher. (Ignatius Reza, #2117)
66
-
67
- ### 4.0.0.beta2
68
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v4.0.0.beta1...v4.0.0.beta2)
69
-
70
- Bug Fixes:
71
-
72
- * Fix version dependencies in gemspec.
73
-
74
- ### 4.0.0.beta1
75
- [Full Changelog](https://github.com/rspec/rspec-rails/compare/v3.9.0...v4.0.0.beta1)
76
-
77
- Enhancements:
78
-
79
- * Adds support for Rails 6. (Penelope Phippen, Benoit Tigeot, Jon Rowe, #2071)
32
+ * Add argument matcher support to `have_enqueued_*` matchers. (Phil Pirozhkov, #2206)
33
+ * Switch generated templates to use ruby 1.9 hash keys. (Tanbir Hasan, #2224)
34
+ * Add `have_been_performed`/`have_performed_job`/`perform_job` ActiveJob
35
+ matchers (Isaac Seymour, #1785)
36
+ * Default to generating request specs rather than controller specs when
37
+ generating a controller (Luka Lüdicke, #2222)
38
+ * Allow `ActiveJob` matchers `#on_queue` modifier to take symbolic queue names. (Nils Sommer, #2283)
39
+ * The scaffold generator now generates request specs in preference to controller specs.
40
+ (Luka Lüdicke, #2288)
41
+ * Add configuration option to disable ActiveRecord. (Jon Rowe, Phil Pirozhkov, Hermann Mayer, #2266)
42
+ * Set `ActionDispatch::SystemTesting::Server.silence_puma = true` when running system specs.
43
+ (ta1kt0me, Benoit Tigeot, #2289)
80
44
 
81
45
  Bug Fixes:
82
46
 
@@ -86,12 +50,35 @@ Bug Fixes:
86
50
  deprecated. (Pavel Rosický, #2092)
87
51
  * `ActionView::Template#formats` has been deprecated and replaced by
88
52
  `ActionView::Template#format`(Seb Jacobs, #2100)
53
+ * Replace `before_teardown` as well as `after_teardown` to ensure screenshots
54
+ are generated correctly. (Jon Rowe, #2164)
55
+ * `ActionView::FixtureResolver#hash` has been renamed to `ActionView::FixtureResolver#data`.
56
+ (Penelope Phippen, #2076)
57
+ * Prevent `driven_by(:selenium)` being called due to hook precedence.
58
+ (Takumi Shotoku, #2188)
59
+ * Prevent a `WrongScopeError` being thrown during loading fixtures on Rails
60
+ 6.1 development version. (Edouard Chin, #2215)
61
+ * Fix Mocha mocking support with `should`. (Phil Pirozhkov, #2256)
62
+ * Restore previous conditional check for setting `default_url_options` in feature
63
+ specs, prevents a `NoMethodError` in some scenarios. (Eugene Kenny, #2277)
64
+ * Allow changing `ActiveJob::Base.queue_adapter` inside a system spec.
65
+ (Jonathan Rochkind, #2242)
66
+ * `rails generate generator` command now creates related spec file (Joel Azemar, #2217)
67
+ * Relax upper `capybara` version constraint to allow for Capybara 3.x (Phil Pirozhkov, #2281)
68
+ * Clear ActionMailer test mailbox after each example (Benoit Tigeot, #2293)
89
69
 
90
70
  Breaking Changes:
91
71
 
92
72
  * Drops support for Rails below 5.0
93
73
  * Drops support for Ruby below 2.3
94
74
 
75
+ ### 3.9.1 / 2020-03-10
76
+ [Full Changelog](http://github.com/rspec/rspec-rails/compare/v3.9.0...v3.9.1)
77
+
78
+ Bug Fixes:
79
+
80
+ * Add missing require for have_enqueued_mail matcher. (Ignatius Reza, #2117)
81
+
95
82
  ### 3.9.0 / 2019-10-08
96
83
  [Full Changelog](https://github.com/rspec/rspec-rails/compare/v3.8.3...v3.9.0)
97
84
 
data/README.md CHANGED
@@ -8,6 +8,7 @@ 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
+ Use **[`rspec-rails` 3.x][]** for Rails earlier than 5.0.
11
12
  Use **[`rspec-rails` 1.x][]** for Rails 2.x.
12
13
 
13
14
  [Build Status]: https://secure.travis-ci.org/rspec/rspec-rails.svg?branch=master
@@ -19,6 +20,7 @@ Use **[`rspec-rails` 1.x][]** for Rails 2.x.
19
20
  [RSpec]: https://rspec.info/
20
21
  [Ruby on Rails]: https://rubyonrails.org/
21
22
  [`rspec-rails` 1.x]: https://github.com/dchelimsky/rspec-rails
23
+ [`rspec-rails` 3.x]: https://github.com/rspec/rspec-rails/tree/3-9-maintenance
22
24
 
23
25
  ## Installation
24
26
 
@@ -28,7 +30,7 @@ Use **[`rspec-rails` 1.x][]** for Rails 2.x.
28
30
  ```ruby
29
31
  # Run against the latest stable release
30
32
  group :development, :test do
31
- gem 'rspec-rails', '~> 4.0'
33
+ gem 'rspec-rails', '~> 4.0.0'
32
34
  end
33
35
 
34
36
  # Or, run against the master branch
@@ -187,8 +189,8 @@ to test the various parts of a Rails system:
187
189
  | [`be_a_new`][] | | all | primarily intended for controller specs |
188
190
  | [`render_template`][] | `assert_template` | request / controller / view | use with `expect(response).to` |
189
191
  | [`redirect_to`][] | `assert_redirect` | request / controller | use with `expect(response).to` |
190
- | [`route_to`] | `assert_routing` | routing / controller | replaces `route_for` from version 1.x |
191
- | [`be_routable`] | | routing / controller | usu. for `expect(...).not_to be_routable` |
192
+ | [`route_to`] | `assert_routing` | routing / controller | use with `expect(...).to route_to` |
193
+ | [`be_routable`] | | routing / controller | use with `expect(...).not_to be_routable` |
192
194
  | [`have_http_status`][] | | request / controller / feature | |
193
195
  | [`match_array`][] | | all | for comparing arrays of ActiveRecord objects |
194
196
  | [`have_been_enqueued`][] | | all | requires config: `ActiveJob::Base.queue_adapter = :test` |
@@ -21,8 +21,8 @@ if defined?(ActionMailer)
21
21
 
22
22
  included do
23
23
  include ::Rails.application.routes.url_helpers
24
- options = ::Rails.configuration.action_mailer.default_url_options
25
- options&.each { |key, value| default_url_options[key] = value }
24
+ options = ::Rails.configuration.action_mailer.default_url_options || {}
25
+ options.each { |key, value| default_url_options[key] = value }
26
26
  end
27
27
 
28
28
  # Class-level DSL for mailer specs.
@@ -96,8 +96,8 @@ module RSpec
96
96
  end
97
97
  end
98
98
 
99
- def driven_by(*args, &blk)
100
- @driver = ::ActionDispatch::SystemTestCase.driven_by(*args, &blk).tap(&:use)
99
+ def driven_by(driver, **driver_options, &blk)
100
+ @driver = ::ActionDispatch::SystemTestCase.driven_by(driver, **driver_options, &blk).tap(&:use)
101
101
  end
102
102
 
103
103
  before do
@@ -30,8 +30,12 @@ module RSpec
30
30
  self
31
31
  end
32
32
 
33
- def at(date)
34
- @at = date
33
+ def at(time_or_date)
34
+ case time_or_date
35
+ when Time then @at = Time.at(time_or_date.to_f)
36
+ else
37
+ @at = time_or_date
38
+ end
35
39
  self
36
40
  end
37
41
 
@@ -131,15 +131,15 @@ module RSpec
131
131
  end
132
132
 
133
133
  def legacy_mail?(job)
134
- job[:job] == ActionMailer::DeliveryJob
134
+ job[:job] <= ActionMailer::DeliveryJob
135
135
  end
136
136
 
137
137
  def parameterized_mail?(job)
138
- RSpec::Rails::FeatureCheck.has_action_mailer_parameterized? && job[:job] == ActionMailer::Parameterized::DeliveryJob
138
+ RSpec::Rails::FeatureCheck.has_action_mailer_parameterized? && job[:job] <= ActionMailer::Parameterized::DeliveryJob
139
139
  end
140
140
 
141
141
  def unified_mail?(job)
142
- RSpec::Rails::FeatureCheck.has_action_mailer_unified_delivery? && job[:job] == ActionMailer::MailDeliveryJob
142
+ RSpec::Rails::FeatureCheck.has_action_mailer_unified_delivery? && job[:job] <= ActionMailer::MailDeliveryJob
143
143
  end
144
144
  end
145
145
  # @api public
@@ -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 = '4.0.0'
6
+ STRING = '4.0.1'
7
7
  end
8
8
  end
9
9
  end
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: 4.0.0
4
+ version: 4.0.1
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: 2020-03-24 00:00:00.000000000 Z
47
+ date: 2020-05-16 00:00:00.000000000 Z
48
48
  dependencies:
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: actionpack
@@ -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/v4.0.0/Changelog.md
299
+ changelog_uri: https://github.com/rspec/rspec-rails/blob/v4.0.1/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
@@ -309,14 +309,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
309
309
  requirements:
310
310
  - - ">="
311
311
  - !ruby/object:Gem::Version
312
- version: '0'
312
+ version: 2.2.0
313
313
  required_rubygems_version: !ruby/object:Gem::Requirement
314
314
  requirements:
315
315
  - - ">="
316
316
  - !ruby/object:Gem::Version
317
317
  version: '0'
318
318
  requirements: []
319
- rubygems_version: 3.1.2
319
+ rubygems_version: 3.1.3
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: RSpec for Rails
metadata.gz.sig CHANGED
Binary file