-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix specs on Rails master/6.1.0.alpha #3614
Merged
aldesantis
merged 3 commits into
solidusio:master
from
filippoliverani:filippoliverani/fix-specs-against-rails-master
May 11, 2020
Merged
Fix specs on Rails master/6.1.0.alpha #3614
aldesantis
merged 3 commits into
solidusio:master
from
filippoliverani:filippoliverani/fix-specs-against-rails-master
May 11, 2020
Conversation
This file contains 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
filippoliverani
changed the title
Fix Search::Base specs on Rails master/6.1.0.alpha
Specs on Rails master/6.1.0.alpha
May 8, 2020
filippoliverani
changed the title
Specs on Rails master/6.1.0.alpha
Fix specs on Rails master/6.1.0.alpha
May 8, 2020
jarednorman
approved these changes
May 8, 2020
Nice. I see this is still failing the Rails master build, but I like the approach. |
ActiveRecord-genereated SQL is bound to change and should not be used in expectations. Search results expectations now verify actual search output only.
rspec-rails is not yet compatible with latest versions of ActionDispatch::TestProcess::FixtureFile and raises an error while interacting with it. Rack::Test::UploadedFile handles our use-case in the same away and doesn't have any compatbility issues.
filippoliverani
force-pushed
the
filippoliverani/fix-specs-against-rails-master
branch
from
May 9, 2020 14:37
6cc19b4
to
508e320
Compare
When filtering on ranges `between` Arel operator must be used. `in` operator implementation isn't converted anymore in a between query, it was a deperecated optimization now removed in rails/rails#39163
filippoliverani
force-pushed
the
filippoliverani/fix-specs-against-rails-master
branch
from
May 10, 2020 11:46
662f4fc
to
9c14a50
Compare
Thank you @jarednorman , almost there! |
kennyadsl
approved these changes
May 11, 2020
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.
Thanks, Filippo!
aldesantis
approved these changes
May 11, 2020
Thanks @filippoliverani! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Search::Base
specs started to fail becauseActiveRecord
-generated SQL has changed in Rails master/6.1.0.alpha.Generated SQL is bound to change and should not be used in expectations. Search results expectations now verify actual search output only.
When filtering on ranges
between
Arel operator must be used.in
operator implementation isn't converted anymore in abetween
SQL query, itwas a deprecated optimization now removed in rails/rails#39163
Spree::Api::ImagesController
request specs started to fail becauseActionDispatch::TestProcess::FixtureFile#fixture_file_upload
has been changed in Rails master/6.1.0.alpha and rspec-rails is not compatible anymore with it.Rack::Test::UploadedFile
handles our use-case in the same away and doesn't have any compatibility issues.Checklist:
[ ] I have updated Guides and README accordingly to this change (if needed)[ ] I have added tests to cover this change (if needed)[ ] I have attached screenshots to this PR for visual changes (if needed)