When creating tests using Rspec we have the ability to add flags to those tests that will signal to Rspec to run certain commands before, after, or around the test example.
Some flags that we use are:
type: <test type>
If you are debugging a
js: true spec and want to see the browser, you can set
HEADLESS=false before running a spec:
HEADLESS=false bundle exec rspec spec/app/system