-
Notifications
You must be signed in to change notification settings - Fork 242
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
[WIP] fix for RSpec deprecation warning, take III #335
base: master
Are you sure you want to change the base?
Conversation
@@ -9,6 +9,12 @@ def rspec_summary_args(*args) | |||
[n.new(*args)] | |||
end | |||
|
|||
# Returns a Hash that throws an error if a key is accessed that isn't set. | |||
def hash_double(attrs) | |||
dbl = Hash.new{|hsh, key| raise "Missing key: #{key.inspect}." } |
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.
Unused block argument - hsh
. If it's necessary, use _
or _hsh
as an argument name to indicate that it won't be used.
Space missing to the left of {.
Space between { and | missing.
Be sure to check out: https://github.com/rspec/rspec-core/blob/master/Changelog.md#300rc1--2014-05-18 quote:
Ideally, provide the metadata you have that's creating the deprecation. It's one thing to avoid the deprecation, it's another to get the location properly regardless of the RSpec version - it's best to have an extra spec that demonstrates how to get the deprecation. From what I understand, accessing With this code, guard-rspec/lib/guard/rspec_formatter.rb Line 36 in 0e34593
Anyway, I'm a bit confused about the issue. Good specs would help. |
If you can, extract the example with the deprecation into a repo, and I'll check it out - I don't like the way the implementation iterates to get the location, but I want to reproduce your exact scenario (example, nesting, file, whether you're using shared examples or not) before I change anything. |
Maybe an update: if you're using RSpec 3.3.x, you shouldn't have the deprecations, because this line should always be true: guard-rspec/lib/guard/rspec_formatter.rb Line 35 in 0e34593
(This means, if you're getting the deprecations, then somehow strangely spec_path? is returning false - which seems wrong). You can also |
The deprecation error is likely because of this: #338 |
Follow-up to #328, which didn't do the trick unfortunately. Still getting the same error as #327 (comment), because
metadata[:parent_example_group]
is still being accessed.