You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I track the process when executed bundle exec rake parallel:spec['spec','-- target_folder'].
In this case, the type variable contains the string value "spec".
It hasn't been specified with options like -n or -p, so when executing OptionParse, "spec" strings remain in the args. https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/cli.rb#L288
and then, in extract_file_paths(argv) method, "spec" is returned unintentionally with "target_folder".
As a result, spec files are executed, including non_target_spec.rb
Hello!
Summary
When executing with
bundle exec rake parallel:spec
and specifying a folder, unnecessary specs also get executed.Steps to Reproduce
Conditions
We have our specs in a file structure that looks like this.
We want execute spec files only in target_folder.
Executed command
bundle exec rake parallel:spec['spec','-- target_folder']
Expected Behavior
spec files only in target_folder are executed
Actual Behavior
spec files are executed, including non_target_spec.rb
My opinion
I understand this problem can avoid by using other command.
That's it #434
bundle exec parallel_rspec target_folder
I'm considering making changes because unnecessary operations might be causing this issue.
https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/tasks.rb#L120
I want suggest like this.
I track the process when executed
bundle exec rake parallel:spec['spec','-- target_folder']
.In this case, the
type
variable contains the string value "spec".It hasn't been specified with options like -n or -p, so when executing OptionParse, "spec" strings remain in the args.
https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/cli.rb#L288
and then, in
extract_file_paths(argv)
method, "spec" is returned unintentionally with "target_folder".As a result, spec files are executed, including non_target_spec.rb
So, I think
type
is unnessesary in https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/tasks.rb#L120Even if folder is not specified, spec folder is specified by
default_test_folder
method. so, i think no problem. https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/cli.rb#L300Please let me know if you have any concerns regarding this change.
If there are no concerns, I'll go ahead and submit a PR!
This is my first time submitting an issue, so I apologize if I said anything odd or out of place.
The text was updated successfully, but these errors were encountered: