-
Notifications
You must be signed in to change notification settings - Fork 48
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
Upgrade to RSpec 3 #55
Conversation
In what way does it not work? Can you point me to the place in the code where it says that example group is deprecated? This is what it says in the master branch of rspec core: https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/example_group.rb#L5-L6 |
Sorry for my bad "doesn't work" description. '
|
Ah, so how about trying to call |
I tried, but the example's metadata hash doesn't have the Maybe it's super obvious, but I didn't figured it out yet :) |
No not super-obvious. OK, so what about instead of using the https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/example.rb#L110 I couldn't see a https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/example_group.rb#L241 |
Inspired by VCR’s path implementation
VCR has the same construction. I borrowed their code and now the deprecation warning is gone! https://github.com/vcr/vcr/blob/master/lib/vcr/test_frameworks/rspec.rb#L10-L22 Thanks for your help @kytrinyx! |
Nice, thank you! |
So far I did:
Todo:
example_group
is deprecated, therefore https://github.com/Willianvdv/approvals/blob/rspec3/lib/approvals/namers/directory_namer.rb#L15-L17 doesn't work anymore. I'm not sure how to fix this. I could use :full_path, but that returns (when normalized):instead of: