https://github.com/dannyben/respec
RSpec Convenience Wrapper
https://github.com/dannyben/respec
rspec ruby
Last synced: 2 months ago
JSON representation
RSpec Convenience Wrapper
- Host: GitHub
- URL: https://github.com/dannyben/respec
- Owner: DannyBen
- License: mit
- Created: 2022-11-29T19:20:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-28T07:22:31.000Z (5 months ago)
- Last Synced: 2025-02-02T03:43:09.937Z (4 months ago)
- Topics: rspec, ruby
- Language: Shell
- Homepage:
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Respec - RSpec Convenience Wrapper
[](https://github.com/DannyBen/respec/actions/workflows/test.yml)
---
Respec is a bash script convenience interface for Ruby's RSpec.
## Install
### Installing using the setup script
This setup script will download the respec executable to `/usr/local/bin/` and
install an autocomplete script in the bash completions directory.```shell
$ curl -Ls get.dannyb.co/respec/setup | bash
```Feel free to inspect the [setup script](setup) before running.
### Installing manually
Download the [respec](respec) script to `/usr/local/bin/` or anywhere in your
`PATH`, and make it executable.## Usage
```
Usage:
respec [COMMAND]
respec [COMMAND] --help | -h
respec --version | -vCommands:
all Run all specs (default)
focus Run specs tagged with :focus
only Run specs only on files matching a pattern
except Run specs except files matching a pattern
tagged Run specs that include/exclude certain tags
last Run specs on files modified in the last N minutes
fails Run the last failed specs
continue Continue from where the last run stopped
refactor Shortcut for 'respec last 2 --watch'
reset Delete the status file
completions Echo completions function
```## Setup
Update the following files in your repository.
### Status file setup
This is required for the `respec continue`, `respec fails` commands.
```ruby
# spec/spec_helper.rb
RSpec.configure do |config|
config.example_status_persistence_file_path = 'spec/status.txt'
end
```and then, you should probably gitignore this file.
```bash
# .gitignore
/spec/status.txt
```### Recommended rspec arguments
Put this in the `.rspec` file in your repository.
```bash
# .rspec
--require spec_helper
--color
--format documentation
--fail-fast
```