-
-
Notifications
You must be signed in to change notification settings - Fork 41
rspec-rails 4.0 release blog post #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5ecdb0c
rspec-rails 4.0 release blog post
benoittgt 938dddf
Typo: Stop using french
benoittgt f51ea45
Link to stable guides not edge.
JonRowe 78cc723
Apply suggestions from code review
benoittgt b1fedb8
Use "queue adapter" instead of "queue"
benoittgt 0a31cb5
We support Ruby 2.2
benoittgt 2ce73c5
Version lock removable between gems needs more visibility
benoittgt db6ba51
Mention other ORM + apply suggestion from Phil
benoittgt 5f1fc8e
Add Jon suggestions
benoittgt 25b097a
Apply suggestions from code review
benoittgt 080e981
Remove extra line + add missing blank line
benoittgt 0394e83
Display contributors list and changelog from 3.9.1 to last release: 4…
benoittgt 4d21e56
Provide a clear example for Mailbox specs
benoittgt 822edd8
Apply suggestions from code review
benoittgt d678169
Rename file to the date of rspec-rails 4.0.0 release
benoittgt f23dd86
Display code block properly
benoittgt c3cb421
Apply suggestions from code review
benoittgt f84899c
Remove extra line + set proper formating for ruby code block
benoittgt 690dba8
Mail is delivered not bounced
benoittgt 7f5d471
Do not combine changelogs. This is wrong.
benoittgt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
175 changes: 175 additions & 0 deletions
175
source/blog/2019-05-11-rspec-rails-4-0-has-been-released.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
--- | ||
title: RSpec Rails 4.0 has been released! | ||
author: Benoit Tigeot, Jon Rowe and Phil Pirozhkov | ||
--- | ||
|
||
RSpec Rails 4.0 has been released recently! Given our commitment to | ||
[semantic versioning](http://semver.org/), this update come with | ||
breaking changes for people that are using Rails below 4.2. If we | ||
did introduce any bugs, please let us know, and we'll get | ||
a patch release out with a fix ASAP. | ||
|
||
RSpec continues to be a community-driven project with contributors | ||
from all over the world. This release includes 258 commits and 56 | ||
merged pull requests from 27 different contributors! | ||
pirj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Thank you to everyone who helped make this release happen! | ||
|
||
## Notable Changes | ||
|
||
RSpec Rails was release with full support and many improvements for | ||
Rails 6. | ||
|
||
### Breaking changes | ||
|
||
This version no longer support Ruby bellow 2.3. We soft support | ||
Rails 4.2 but we encourage you to use rspec-rails with Rails 5 | ||
at least. | ||
|
||
### JRuby support | ||
|
||
We very happy to support JRuby on this new release. You can now use | ||
`rspec-rails` with Rails 5.2 and 6 and JRuby. | ||
|
||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### Support for Action Cable | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Using a [channel spec][1] it will be easy to test your Action Cable | ||
channels. A `channels spec` is a thin wrapper for an | ||
`ActionCable::Channel::TestCase`, and includes all of the behavior | ||
and assertions that it provides, in addition to RSpec's own | ||
behavior and expectations. | ||
|
||
It also includes helpers from `ActionCable::Connection::TestCase` | ||
to make it possible to test connection behavior. | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Support for Action Mailbox | ||
|
||
Rails 6 came with [Action Mailbox][2]. We can now test them using | ||
`:mailbox` flag. | ||
|
||
```ruby | ||
``` | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
TODO: We do no have feature test for this... | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Improvements on generators | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If you use generators, there is some improvements: | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- No more Ruby 1.9 hash syntax in file generated | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Scaffold generator generates request specs instead of | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
controller spec | ||
- New [generators][3] available (channel, generator, mailbox...) | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Choose which Active Job `queue_adapteur` in system specs | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Some people want to run Active Job with a specific queue. In system | ||
specs you can now choose your desired queue: | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```ruby | ||
before do | ||
ActiveJob::Base.queue_adapter = :inline | ||
end | ||
``` | ||
|
||
### Silent log with Puma | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
By default Puma will not print starting logs anymore when you are | ||
running system specs. | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Ability to disable Active Record | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Some people use Rails without database connection. They do not need | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
`ActiveRecord`. You can now choose to disable it in your RSpec config: | ||
`config.use_active_record = false` | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Version sync between RSpec gems | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
`rspec-rails` no longer follow the version of other RSpec gems, that | ||
means that `rspec-rails` will ask at least rspec-core, | ||
rspec-expectations, rspec-mocks and rspec-support at version 3.9.0. | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Stats: | ||
|
||
* **Total Commits**: 258 | ||
* **Merged pull requests**: 56 | ||
* **27 contributors**: Andrew White, Anton Rieder, Benoit Tigeot, Jon Rowe, | ||
David Revelo, Giovanni Kock Bonetti, Ignatius Reza, James Dabbs, Joel AZEMAR, | ||
John Hawthorn, Jonathan Rochkind, Kieran O'Grady, Moshe Kamensky, | ||
OKURA Masafumi, Olle Jonsson, Pedro Paiva, Phil Pirozhkov, Penelope Phippen, | ||
Seb Jacobs, Tanbir Hasan, Viacheslav Bobrov, Vladimir Dementyev, Xavier Shay, | ||
alpaca-tc, pavel, ta1kt0me | ||
|
||
## Docs | ||
|
||
### API Docs | ||
|
||
* [rspec-rails](/documentation/4.0/rspec-rails/) | ||
|
||
### Cucumber Features | ||
|
||
* [rspec-rails](https://relishapp.com/rspec/rspec-rails/v/4-0/) | ||
|
||
## Release Notes | ||
|
||
### 4.0.0 / 2020-03-24 | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v3.9.1...v4.0.0) | ||
|
||
Enhancements: | ||
|
||
* Adds support for Rails 6. (Penelope Phippen, Benoit Tigeot, Jon Rowe, #2071) | ||
* Adds support for JRuby on Rails 5.2 and 6 | ||
* Add support for parameterised mailers (Ignatius Reza, #2125) | ||
* Add ActionMailbox spec helpers and test type (James Dabbs, #2119) | ||
* Add ActionCable spec helpers and test type (Vladimir Dementyev, #2113) | ||
* Add support for partial args when using `have_enqueued_mail` | ||
(Ignatius Reza, #2118, #2125) | ||
* Add support for time arguments for `have_enqueued_job` (@alpaca-tc, #2157) | ||
* Improve path parsing in view specs render options. (John Hawthorn, #2115) | ||
* Add routing spec template as an option for generating controller specs. | ||
(David Revelo, #2134) | ||
* Add argument matcher support to `have_enqueued_*` matchers. (Phil Pirozhkov, #2206) | ||
* Switch generated templates to use ruby 1.9 hash keys. (Tanbir Hasan, #2224) | ||
* Add `have_been_performed`/`have_performed_job`/`perform_job` ActiveJob | ||
matchers (Isaac Seymour, #1785) | ||
* Default to generating request specs rather than controller specs when | ||
generating a controller (Luka Lüdicke, #2222) | ||
* Allow `ActiveJob` matchers `#on_queue` modifier to take symbolic queue names. (Nils Sommer, #2283) | ||
* The scaffold generator now generates request specs in preference to controller specs. | ||
(Luka Lüdicke, #2288) | ||
* Add configuration option to disable ActiveRecord. (Jon Rowe, Phil Pirozhkov, Hermann Mayer, #2266) | ||
* Set `ActionDispatch::SystemTesting::Server.silence_puma = true` when running system specs. | ||
(ta1kt0me, Benoit Tigeot, #2289) | ||
|
||
Bug Fixes: | ||
|
||
* `EmptyTemplateHandler.call` now needs to support an additional argument in | ||
Rails 6. (Pavel Rosický, #2089) | ||
* Suppress warning from `SQLite3Adapter.represent_boolean_as_integer` which is | ||
deprecated. (Pavel Rosický, #2092) | ||
* `ActionView::Template#formats` has been deprecated and replaced by | ||
`ActionView::Template#format`(Seb Jacobs, #2100) | ||
* Replace `before_teardown` as well as `after_teardown` to ensure screenshots | ||
are generated correctly. (Jon Rowe, #2164) | ||
* `ActionView::FixtureResolver#hash` has been renamed to `ActionView::FixtureResolver#data`. | ||
(Penelope Phippen, #2076) | ||
* Prevent `driven_by(:selenium)` being called due to hook precedence. | ||
(Takumi Shotoku, #2188) | ||
* Prevent a `WrongScopeError` being thrown during loading fixtures on Rails | ||
6.1 development version. (Edouard Chin, #2215) | ||
* Fix Mocha mocking support with `should`. (Phil Pirozhkov, #2256) | ||
* Restore previous conditional check for setting `default_url_options` in feature | ||
specs, prevents a `NoMethodError` in some scenarios. (Eugene Kenny, #2277) | ||
* Allow changing `ActiveJob::Base.queue_adapter` inside a system spec. | ||
(Jonathan Rochkind, #2242) | ||
* `rails generate generator` command now creates related spec file (Joel Azemar, #2217) | ||
* Relax upper `capybara` version constraint to allow for Capybara 3.x (Phil Pirozhkov, #2281) | ||
* Clear ActionMailer test mailbox after each example (Benoit Tigeot, #2293) | ||
|
||
Breaking Changes: | ||
|
||
* Drops support for Rails below 5.0 | ||
* Drops support for Ruby below 2.3 | ||
benoittgt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[1]: https://relishapp.com/rspec/rspec-rails/v/4-0/docs/channel-specs | ||
[2]: https://edgeguides.rubyonrails.org/action_mailbox_basics.html | ||
[3]: https://relishapp.com/rspec/rspec-rails/v/4-0/docs/generators |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.