.vscode/tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run tests",
"type": "shell",
"command": "if [[ -n $(git status -s) ]]; then echo \"Error: There are uncommitted files, please commit or discard the changes before executing this command.\"; exit 1; fi && rm -fr spec/output && bundle exec rspec && git add spec/output && git status && git diff --staged --exit-code -- spec/output || (echo \"Test outputs contain changes.\" && exit 1)",
"group": "test",
"presentation": {
"reveal": "always",
"panel": "new"
}
}
]
}