-
-
Notifications
You must be signed in to change notification settings - Fork 1k
-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Rails 6 will remove success? predicate in favor of successful? #1857
Comments
I'm not sure how to deal with this. Maybe we may edit
|
Basically the whole |
Probably something like: def self.matcher_for_status(target)
if GenericStatus.valid_statuses.include?(target)
RSpec.deprecate(
GenericStatus.valid_statuses.map { |c| "`:#{c}`" }.join(', '),
replacement: "the Rack::Response::Helpers predicates as symbols",
)
GenericStatus.new(target)
elsif Symbol === target
SymbolicStatus.new(target)
else
NumericCode.new(target)
end
end alternatively we could just leave as is since the Rails deprecation takes care of it. In your case you're probably using something like |
Thanks for the answer, just tried that and got the following error :
I thinks this is because |
Good point. In the interim you could do Perhaps a more adequate solution would be to make these Rack Helpers the new GenericStatus.valid_statuses whilst deprecating the old ones. |
I'm writing a PR for the more adequate solution. However, I am not sure about This is a breaking change already in Rails 5, so I think we should support both here, but without any deprecation warning. |
Is this fixed by #1951? |
Closed by #1951 |
This addresses a deprecation warning for Rails 6. See rspec/rspec-rails#1857 and https://www.neontsunami.com/posts/rails-success-predicate-deprecation.
This addresses a deprecation warning for Rails 6. See rspec/rspec-rails#1857 and https://www.neontsunami.com/posts/rails-success-predicate-deprecation.
This addresses a deprecation warning for Rails 6. See rspec/rspec-rails#1857 and https://www.neontsunami.com/posts/rails-success-predicate-deprecation.
While running against Rails 5.2.0.alpha, I encountered the following message when running my test suite:
The message is coming from rails/rails#30104 (rails/rails@af3500b)
The text was updated successfully, but these errors were encountered: