Setup vscode tasks for rspec#793
Open
zetter-rpf wants to merge 1 commit intomainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds developer tooling to make running RSpec from VS Code easier by introducing an RSpec binstub and VS Code task definitions.
Changes:
- Add
bin/rspecBundler-generated binstub to run RSpec without typingbundle exec. - Add
.vscode/tasks.jsonwith tasks to run the current spec file or the spec at the current line.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
bin/rspec |
Adds an RSpec binstub that runs rspec-core via Bundler. |
.vscode/tasks.json |
Defines VS Code tasks to run RSpec for the current file or current line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test coverage89.47% line coverage reported by SimpleCov. |
Note that you will need to have asdf on your non-interactive shell path for this to work. If you see a bunder not installed message this is likely the cause. You can fix this by making sure asdf is added to your path in your zprofile instead of your zshrc. I've added the rspec bin stub as part of this as it's quicker than typing bundle exec and simpler than using it in the tasks.json
6ed91c3 to
97da614
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Set up tasks to make it easier to run rspec, similar to RaspberryPiFoundation/editor-ui#1344 and https://github.com/RaspberryPiFoundation/editor-standalone/pull/780
Note that you will need to have asdf on your non-interactive shell path for this to work. If you see a 'bundler not installed' message this is likely the cause.
You can fix this by making sure asdf is added to your path in your
.zprofileinstead of your.zshrc.I've added the rspec bin stub as part of this as it's quicker than typing bundle exec and simpler than using it in the tasks.json