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
There can be a situation when one small test is failing and you spend hours to make it work. But initialization can take so long, so it is about 30 seconds waiting for initialization and 1 second to execute the test. I wonder, what if rspec supported interactive mode, like waiting for file or files for input and running them interactively? I can prepare a PR for that if is is acceptable.
Your environment
Ruby version: 2.6.6
rspec-core version: 2.14.8
Steps to reproduce
Add a custom seeder to rspec that loads some data from a file into database.
Write a small test
Wait for a test to complete and see how long it takes to just seed the environment
Proposition
Add an -i, --interactive flag that allows running rspec in interactive mode when it loads the environment once and only runs needed tests
The text was updated successfully, but these errors were encountered:
The problem with pinning your environment, is it won't be reloaded, its not as simple as "load your environment, run specs, await your command to run specs again" we would need to know what files changed, clear our the old code, reload those files, and then run specs again.
As @pirj points out this is an approach Rails has tried for many years to speed up its notoriously slow boot time and there are several solutions that have spun out from that, there isn't one solution because its really hard, and at best its a band aid and has numerous problems. That isn't something RSpec is interested in maintaining.
However. If you wanted to work on an api defining a "preload" hook, a "reload" hook, and a "trigger", then have an interactive mode that calls preload, runs specs, resets, then calls the reload hook when triggerd, I would not be against that.
But I don't want to maintain the magic of reloading code ourselves.
Subject of the issue
There can be a situation when one small test is failing and you spend hours to make it work. But initialization can take so long, so it is about 30 seconds waiting for initialization and 1 second to execute the test. I wonder, what if rspec supported interactive mode, like waiting for file or files for input and running them interactively? I can prepare a PR for that if is is acceptable.
Your environment
Steps to reproduce
Proposition
-i, --interactive
flag that allows running rspec in interactive mode when it loads the environment once and only runs needed testsThe text was updated successfully, but these errors were encountered: