Conversation
1 task
c26c803 to
1d1945c
Compare
SPEC_OPTS is set in Queue ModeSPEC_OPTS is set in Queue Mode
… by test examples feature when `SPEC_OPTS` is set in Queue Mode
1d1945c to
c4509be
Compare
3v0k4
approved these changes
Jun 20, 2023
|
|
||
| ### 5.1.2 | ||
|
|
||
| * Fix broken RSpec split by test examples feature when `SPEC_OPTS` is set in Queue Mode |
Contributor
There was a problem hiding this comment.
Have you considered adding a brief explanation on how the fix works? (e.g. ignore SPEC_OPTS, ensure formatter)
| desc "Generate JSON report for test suite based on default test pattern or based on defined pattern with ENV vars" | ||
| task :rspec_test_example_detector do | ||
| # ignore the `SPEC_OPTS` options to not affect RSpec execution within this rake task | ||
| ENV.delete('SPEC_OPTS') |
Contributor
There was a problem hiding this comment.
This is run in a shelled out process so it doesn't affect the ENV for other processes?
SPEC_OPTS is set in Queue ModeSPEC_OPTS is set in Queue Mode. Ignore SPEC_OPTS when generating test examples report for slow test files.
This file contains hidden or 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
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.
problem
Related to the RSpec split by test examples feature.
Some users use
SPEC_OPTSto pass options to the RSpec.SPEC_OPTSoverrides the options configured by Knapsack Pro.When
SPEC_OPTSis set, then this impacts the options (overrides them) passed to therake knapsack_pro:rspec_test_example_detector, which is responsible for detecting test examples for slow test files.solution
We should ignore
SPEC_OPTSfor therake knapsack_pro:rspec_test_example_detectorto fix the problem with the RSpec split by test examples feature.related
https://rspec.info/documentation/3.0/rspec-core/RSpec/Core/Configuration.html
The
SPEC_OPTSenv var overrides the args provided to theRSpec::Core::ConfigurationOptions.new.support thread
https://groups.google.com/a/knapsackpro.com/g/support/c/6XMMZhIUZNA
story
https://trello.com/c/Et7HS05r