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
Add RSpec 4 compatibility #17652
Add RSpec 4 compatibility #17652
Conversation
@@ -254,7 +254,7 @@ | |||
theme.set_field(target: :common, name: SvgSprite.theme_sprite_variable_name, upload_id: upload.id, type: :theme_upload_var) | |||
theme.save! | |||
|
|||
expect(Upload.where(id: upload.id)).to be_exist | |||
expect(Upload.where(id: upload.id)).to be_exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Upload.where(...).exist?
method doesn't exist, but exists?
does.
Thank you @pirj, some comments but otherwise the PR looks good |
Thanks for the quick review, @tgxworld . Do you want me to squash the last commit? |
d81a86c
to
677e3eb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Don't worry about squashing because we'll do a squash and merge once the PR is ready. |
52eb53c
to
8e27544
Compare
8e27544
to
d5443c1
Compare
Is there something I can do to help making it ready? |
@pirj Thank you for your contribution here |
You may check a PR that also switches to use RSpec 4 and RSpec-Rails 6: pirj#1
There are a few reasons it doesn't make sense to switch right away:
- fixed in 0.10.0rspec-html-matchers
won't work until this PR is mergedWhat's Done
Comply to strict predicate matchers
See:
Has
. rspec/rspec-expectations#1195Basically,
won't pass anymore, as strict predicate matchers would only accept
true
/false
, but not "truthy" or "falsey" values.Use the non-globally exposed RSpec syntax
See rspec/rspec-core#2803
describe
/shared_examples
won't work without the explicitRSpec.
.should
/should_not
were deprecate nearly a decade ago and will be removed.Misc
Discourse specs use defaults, and it helped a lot, there's just
--color
option that had to be removed from.rspec
file.rspec/rspec-core@0407831
RSpec-Rails 6
No changes turned out to be necessary.