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

Expand Spring support for Rspec & regular mode #110

Closed
mhmakshanoff opened this issue Apr 30, 2020 · 2 comments
Closed

Expand Spring support for Rspec & regular mode #110

mhmakshanoff opened this issue Apr 30, 2020 · 2 comments

Comments

@mhmakshanoff
Copy link

I saw a previous request for spring support to speed up executions, and that it had been implemented specifically for cucumber in queue mode: #98

Is it possible to expand support of this so that it can be utilized for Rspec in non-queue (regular) mode?

Happy to also fork and put up a PR myself

@ArturT
Copy link
Member

ArturT commented Apr 30, 2020

Hey @mhmakshanoff

I've just tested it and it's already possible to use spring.

Please try: bundle exec spring rake "knapsack_pro:rspec" then you will see in output:

Running via Spring preloader in process 41166

In case of Cucumber I had to do this PR #98 because Cucumber was started via running bundle exec cucumber command via Kernel.system so I needed to pass spring prefix.
https://knapsackpro.com/faq/question/how-to-use-spring-gem-to-run-cucumber-tests-faster-in-queue-mode

But in case of RSpec, I just run rake task https://github.com/KnapsackPro/knapsack_pro-ruby/blob/a2ae253/lib/knapsack_pro/runners/rspec_runner.rb#L22 so spring should already work if your add spring to knapsack command as I did in bundle exec spring rake "knapsack_pro:rspec"

I probably should add info about using spring with RSpec to my FAQ.

@ArturT
Copy link
Member

ArturT commented Apr 30, 2020

I've added info to the FAQ how to use spring :)
https://knapsackpro.com/faq/question/how-to-use-spring-gem-with-knapsack-pro

Let me know if this works for you. Thanks.

@ArturT ArturT closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants