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

Support passing extra options to rspec #14

Open
louim opened this issue Aug 6, 2021 · 3 comments
Open

Support passing extra options to rspec #14

louim opened this issue Aug 6, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@louim
Copy link

louim commented Aug 6, 2021

I'd like to be able to use this with Guard, like it's possible with to do with parallel_rspec. However this is not currently possible with because guard passes specific options to rspec. Running guard fails with:

[1] guard(main)>
16:04:03 - INFO - Run all
16:04:03 - INFO - Running all specs
/Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/lib/turbo_tests/cli.rb:72:in `run': invalid option: --failure-exit-code (OptionParser::InvalidOption)
	from /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/turbo_tests-1.2.4/bin/turbo_tests:11:in `<top (required)>'
	from bin/turbo_tests:29:in `load'
	from bin/turbo_tests:29:in `<main>'
16:04:03 - ERROR - Failed: "bin/turbo_tests -f progress -r /Users/louim/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/guard-rspec-4.7.3/lib/guard/rspec_formatter.rb -f Guard::RSpecFormatter --failure-exit-code 2  spec" (exit code: 1)

Because turbo_tests choke on the options passed. It would be useful to support possing down options to Rspec via a specific flag.

@ilyazub
Copy link
Collaborator

ilyazub commented Aug 13, 2021

@louim Thank you, Louis!

--test-options option from parallel_tests is a great idea I overlooked. It will solve #13 too.

Steps to implement it:

Things to consider:

  • Deprecate options: -o, --out FILE and -t, --tag TAG. They can be passed via test-options: --test-options '--tag TAG --tag TAG2 --out rspec.txt'

Help is appreciated.

@OneNeptune
Copy link

Would this also resolve something like passing --require spec_helper to rspec? Currently having difficulty loading require 'webmock/rspec' when running turbo_tests.

@ilyazub
Copy link
Collaborator

ilyazub commented Jan 18, 2023

Would this also resolve something like passing --require spec_helper to rspec? Currently having difficulty loading require 'webmock/rspec' when running turbo_tests.

@OneNeptune Can you please provide a repository with reproduction? We use webmock/rspec without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants