-
Notifications
You must be signed in to change notification settings - Fork 24
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
Split spec files to examples programmatically #36
Conversation
f0b71dc
to
2f9ceb5
Compare
JSON.parse(out.string)["examples"].map { |e| e["id"] } | ||
ensure | ||
RSpec.configuration.dry_run = dry_run_before | ||
reset_rspec_state! |
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.
Explain, why do you need to set the original value for the dry_run (only)?
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 that's the one we're messing with (we set it to true
so that we can fetch the example ids without executing any tests). On the contrary, configuration.files_or_directories_to_run
and the formatter we add, are things that will get taken care of by reset_rspec_state!
.
Improves testability.
2f9ceb5
to
a9c4490
Compare
Instead of shelling out to rspec, we now split spec files into individual examples programmatically, using the RSpec Core API. This is faster and more robust, since we avoid common shell shenanigans. Closes #6
a9c4490
to
1044904
Compare
This causes some failures on our internal builds. Will investigate and do a follow up. Closing it until then. |
Instead of shelling out to rspec, we now split spec files into individual examples programmatically, using the RSpec Core API. This is faster and more robust, since we avoid common shell shenanigans.
Closes #6