{"id":15471949,"url":"https://github.com/thadeu/vscode-run-rspec-file","last_synced_at":"2025-07-23T16:43:03.596Z","repository":{"id":34160773,"uuid":"150330009","full_name":"thadeu/vscode-run-rspec-file","owner":"thadeu","description":"Run RSpec Extension for Visual Studio Code (vscode) https://marketplace.visualstudio.com/items?itemName=thadeu.vscode-run-rspec-file","archived":false,"fork":false,"pushed_at":"2024-11-25T16:20:14.000Z","size":168,"stargazers_count":35,"open_issues_count":4,"forks_count":26,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T14:14:49.659Z","etag":null,"topics":["bdd","rails","rspec","spec","tdd","test","vscode-extension","vscode-rspec","vscode-ruby"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thadeu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-25T21:13:08.000Z","updated_at":"2024-10-08T18:45:45.000Z","dependencies_parsed_at":"2024-02-09T20:28:11.359Z","dependency_job_id":"7ce2f327-2307-4659-80ce-a3cc290f6c70","html_url":"https://github.com/thadeu/vscode-run-rspec-file","commit_stats":{"total_commits":123,"total_committers":8,"mean_commits":15.375,"dds":0.09756097560975607,"last_synced_commit":"b1141e0da0caf5d14efe4dae066877e41d3fb689"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fvscode-run-rspec-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fvscode-run-rspec-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fvscode-run-rspec-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fvscode-run-rspec-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thadeu","download_url":"https://codeload.github.com/thadeu/vscode-run-rspec-file/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675596,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdd","rails","rspec","spec","tdd","test","vscode-extension","vscode-rspec","vscode-ruby"],"created_at":"2024-10-02T02:22:37.911Z","updated_at":"2025-04-07T15:06:06.288Z","avatar_url":"https://github.com/thadeu.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Run RSpec Extension for Visual Studio Code (vscode)\n\nThis extension provides basic commands for running spec files in build-in vscode terminal.\n\n## Table of Contents \u003c!-- omit in toc --\u003e\n  - [Motivation](#motivation)\n  - [Features](#features)\n  - [Documentation](#documentation)\n  - [Available Commands](#available-commands)\n  - [Settings](#settings)\n    - [Custom command](#custom-command)\n    - [Custom folder](#custom-folder)\n    - [Custom Suffix File](#custom-suffix-file)\n    - [Use cases](#use-cases)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Motivation\n\nFacility run RSpec in the VSCode Terminal\n\n## Documentation \u003c!-- omit in toc --\u003e\n\nVersion    | Documentation\n---------- | -------------\nunreleased | https://github.com/thadeu/vscode-run-rspec-file/blob/master/README.md\n\n## Features\n\n* Run only current line with cmd+l (RSpec: Run Line on RSpec)\n* Search and Run Spec based current file with cmd+alt+l (RSpec: Run File on RSpec)\n* Search and open file with cmd+alt+o (RSpec: Run Open spec this file)\n* 🎉 Toggle file between spec and source file with cmd+alt+o (RSpec: Run Open spec this file)\n* Run on last spec with cmd+y (RSpec: Run On Last Spec)\n* Run All Opened Files with `cmd+alt+j` (RSpec: Run All Opened Files) [Issue #20](https://github.com/thadeu/vscode-run-rspec-file/issues/20)\n\n## Available Commands\n\n```json\n[\n    {\n        \"command\": \"extension.runLineOnRspec\",\n        \"key\": \"cmd+l\",\n        \"when\": \"editorLangId == 'ruby'\"\n    },\n    {\n        \"command\": \"extension.runAllOpenedFiles\",\n        \"key\": \"cmd+alt+j\",\n        \"when\": \"editorLangId == 'ruby'\"\n    },\n    {\n        \"command\": \"extension.runFileOnRspec\",\n        \"key\": \"cmd+alt+l\",\n        \"when\": \"editorLangId == 'ruby'\"\n    },\n    {\n        \"command\": \"extension.runOpenSpec\", // and toggle between files\n        \"key\": \"cmd+alt+o\",\n        \"when\": \"editorLangId == 'ruby'\"\n    },\n    {\n        \"command\": \"extension.runOnLastSpec\",\n        \"key\": \"cmd+y\",\n        \"when\": \"editorLangId == 'ruby'\"\n    }\n]\n```\n\n| Description                           | Command       |\n|-------------                          | -------       |\n| Run Active Line in the Active File    | `cmd+l`       |\n| Run Opened Files in the Workspace     | `cmd+alt+j`   |\n| Run Single Active File                | `cmd+alt+l`   |\n| Toggle file                           | `cmd+alt+o`   |\n| Run Last Command                      | `cmd+y`       |\n|                                       |               |\n\nEnjoy!\n\n## Settings\n\n### Custom command\n\nYou might want to prefix the rspec command with something like docker or foreman.\n\nWith this configuration you can customize your rspec command as you please. Example when using foreman:\n\n```json\n{\n  \"vscode-run-rspec-file.custom-command\": \"foreman run bundle exec rspec --color\"\n}\n```\n\n### Custom folder\n\nYou want to work in other folder. With this configuration you can customize rspec command to run a custom folder.\n\n```json\n{\n  \"vscode-run-rspec-file.folder\": \"test\"\n}\n```\n\n### Custom Suffix File\n\nYou want to work with other suffix file, for exemplo, if you use Minitest, you set `_test.rb` suffix. So, with this configuration you might customize suffix file. \n\n```json\n{\n    \"vscode-run-rspec-file.suffix\": \"test\"\n}\n```\n\nThe default is `bundle exec rspec --color`.\n\nYou can also customize it per project by adding the same configuration to your project's `.vscode/settings.json`.\n\n### Custom folder for controller specs\n\nYou should now write specs for your controllers as request specs ([source](http://rspec.info/blog/2016/07/rspec-3-5-has-been-released/)). The default thus is to create controller specs at `spec/requests`, but this can be changed via:\n\n```json\n{\n  \"vscode-run-rspec-file.controller-spec-directory\": \"requests\"\n}\n```\n\n### Custom integration type\n\nYou can configure kind of integration would you use. Like `rails` or `lib` `others`. When `rails` is activated, we go mount workspace folder based in your structure for folders. For example:\n\nRails usually use `app`, `lib`, `spec` or `test` folders, so, in your workspace must be first part before this folders. This add suport to use in multi-root/folders projects.\n\n```json\n{ \"vscode-run-rspec-file.integration\": \"rails\" }\n```\n\n### Use cases\n\nProject use another format to tests, like as:\n\n```\n| MundiAPI-RUBY\n  |- lib\n  |- test\n    |- test_charges_controller.rb\n```\n\nSo you can configure like this.\n\n```json\n{\n  \"vscode-run-rspec-file.custom-command\": \"bundle exec rake test\",\n  \"vscode-run-rspec-file.folder\": \"test\",\n  \"vscode-run-rspec-file.suffix\": \"\",\n  \"vscode-run-rspec-file.integration\": \"other\"\n}\n```\n\nAnother example, when use minitest instead of rspec\n\n```\n| packwerk\n  |- lib\n  |- test\n    |- integration\n      |- packwerk\n        |- custom_executable_integration_test.rb\n```\n\n```json\n{\n  \"vscode-run-rspec-file.custom-command\": \"bundle exec rake test\",\n  \"vscode-run-rspec-file.folder\": \"test\",\n  \"vscode-run-rspec-file.suffix\": \"test\",\n  \"vscode-run-rspec-file.integration\": \"minitest\"\n}\n```\n\nAs result `bundle exec rake test test/integration/packwerk/custom_executable_integration_test.rb`\n\nAnd using Rails like Application and RSpec.\n\n```json\n{\n  \"vscode-run-rspec-file.custom-command\": \"bundle exec rspec\",\n  \"vscode-run-rspec-file.folder\": \"spec\",\n  \"vscode-run-rspec-file.suffix\": \"spec\",\n  \"vscode-run-rspec-file.integration\": \"rails\"\n}\n```\n\n# Contributing\n\nOnce you've made your great commits (include tests, please):\n\n1. Fork this repository\n2. Create a topic branch - `git checkout -b my_branch`\n3. Push to your branch - `git push origin my_branch`\n4. Create a pull request\n\nThat's it!\n\nPlease respect the indentation rules and code style. And use 2 spaces, not tabs. And don't touch the version thing or distribution files; this will be made when a new version is going to be released.\n\n# MIT License\n\nCopyright (c) 2018 Thadeu Esteves\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Fvscode-run-rspec-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthadeu%2Fvscode-run-rspec-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Fvscode-run-rspec-file/lists"}