Skip to content
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

Running parallel tests using RSpec ignores additional spec paths in config #929

Open
kiddrew opened this issue Jan 9, 2024 · 2 comments
Labels

Comments

@kiddrew
Copy link

kiddrew commented Jan 9, 2024

I'm working on an enterprise app where some high value customers have additional specs outside of the standard /spec path. We have RSpec configured to look for them using a config in rails_helper.rb

config.pattern += ',../customers/**/spec/**/*_spec.rb'

Running rspec by itself respects that configuration, but parallel_tests expects all specs to live at /spec as defined in the rspec runner:

        def default_test_folder
          "spec"
        end

The workaround for this is to specify the paths you want through the CLI:

parallel_rspec -- spec customers

You lose wildcard functionality, but it at least makes parallel_tests find all the files. IMO, running in RSpec mode should function exactly as RSpec does, which includes using RSpec's configuration.

@grosser
Copy link
Owner

grosser commented Jan 13, 2024

don't think that's possible since that would mean "loading rspec and dumping the files" or loading the whole spec_helper as part of parallel_tests, which is what it tries not to do

if you can make the pattern be configured in .rspec or .parallel_rpsec config files we could maybe parse them though

@grosser grosser added the Bug label Jan 13, 2024
@kiddrew
Copy link
Author

kiddrew commented Jan 15, 2024

Hmm, yeah. I get your point. Adding that config to .parallel_rspec might make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants