Is there a way to configure VS Code to run an Rspec block in the current cursor position?
Either a describe
or it
block.
I found similar functionality through Atom with the Rspec extension. A hot key became available Cmd + alt + X
. Which would trigger the single it
or a group within describe
depending where the cursor was.
You can install this extension https://marketplace.visualstudio.com/items?itemName=noku.rails-run-spec-vscode
And then press Cmd + L
to run the specific describe
or it
I installed Rails Test Runner . Open your spec file, put your cursor on/in the describe
or it
block, then right click. You see 2 choices:
To set up RSpec to run in VS Code, with breakpoints, see my answer .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.