-
Notifications
You must be signed in to change notification settings - Fork 32
Enable Split By Test Example by default in RSpec #288
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
Conversation
4587490
to
9c4eb52
Compare
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.
There's an important thing missing: the formatters are removed from the rspec options but not the ones coming from configuration files (eg, .rspec
).
I think it would be simpler to allow formatters without manually parsing them out (fragile code). This would make all the formatters w/o --out
print to stdout, but we could either:
- Silence stdout but not stderr
> /dev/null
; we need to ensure we are not silencing anything that is needed for debug (in theory, errors should be printed to stderr, but most people throw everything to stdout) - Append
--out /dev/null
(or something like it) to all the existing formatters; we need to test what happens with-f json -o /dev/null -f json -o /path/to/report
- Other ideas?
Are we also supporting --example
and --example-matches
with this PR?
lib/knapsack_pro/test_case_detectors/rspec_test_example_detector.rb
Outdated
Show resolved
Hide resolved
lib/knapsack_pro/test_case_detectors/rspec_test_example_detector.rb
Outdated
Show resolved
Hide resolved
spec/knapsack_pro/test_case_detectors/rspec_test_example_detector_spec.rb
Outdated
Show resolved
Hide resolved
spec/knapsack_pro/test_case_detectors/rspec_test_example_detector_spec.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Riccardo <[email protected]>
Yes. |
Story
https://trello.com/c/xBllV4js/589-enable-sbte-by-default
Description
Enable
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES
by default.This should improve the speed of your builds, but you can disable it with
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=false
.Also, this PR adds support for RSpec tags when using RSpec split by examples.
Checklist reminder
UNRELEASED
section of theCHANGELOG.md
, including the needed bump (ie, patch, minor, major)lib/knapsack_pro/pure/queue/rspec_pure.rb
contains pure functions that are unit tested.lib/knapsack_pro/extensions/rspec_extension.rb
encapsulates calls to RSpec internals and is integration and e2e tested.lib/knapsack_pro/runners/queue/rspec_runner.rb
invokes the pure code and the extension to produce side effects, which are integration and e2e tested.