Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caroodev/rubocop-rspec-focused
RuboCop extension to find focused specs
https://github.com/caroodev/rubocop-rspec-focused
linter rspec rubocop ruby
Last synced: 9 days ago
JSON representation
RuboCop extension to find focused specs
- Host: GitHub
- URL: https://github.com/caroodev/rubocop-rspec-focused
- Owner: CarooDev
- License: mit
- Archived: true
- Created: 2015-02-17T18:50:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T08:27:32.000Z (over 5 years ago)
- Last Synced: 2025-01-16T01:32:05.961Z (17 days ago)
- Topics: linter, rspec, rubocop, ruby
- Language: Ruby
- Size: 22.5 KB
- Stars: 13
- Watchers: 9
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# rubocop-rspec-focused
[![Build Status](https://travis-ci.org/lovewithfood/rubocop-rspec-focused.svg?branch=master)](https://travis-ci.org/lovewithfood/rubocop-rspec-focused)
RuboCop lint for focused specs.
***WARNING: We are no longer maintaining this gem, and will eventually archive this repo. We recommend you use [rubocop-rspec](https://github.com/rubocop-hq/rubocop-rspec) instead.***
This gem finds `focus: true` and the following method calls:
* `focus`
* `fexample`
* `fit`
* `fspecify`
* `fcontext`
* `fdescribe````ruby
# bad
fit 'does something' do
expect(foo).to be_empty
endfdescribe Something do
it 'does something' do
expect(foo).to be_empty
end
endspecify 'does something', focus: true do
expect(foo).to be_empty
endspecify 'does something', :focus do
expect(foo).to be_empty
end# good
it 'does something' do
expect(foo).to be_empty
enddescribe Something do
it 'does something' do
expect(foo).to be_empty
end
endspecify 'does something' do
expect(foo).to be_empty
end
```## Installation
Add this line to your application's Gemfile:
```ruby
gem 'rubocop-rspec-focused', require: false
```And then execute:
$ bundle
And add this to your `.rubocop.yml`:
```yml
require:
- rubocop/rspec/focusedRSpec/Focused:
Enabled: true
```## Contributing
1. Fork it ( https://github.com/lovewithfood/rubocop-rspec-focused/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull RequestFor running the spec files, this project depends on RuboCop's spec helpers.
This means that in order to run the specs locally, you need a (shallow) clone
of the RuboCop repository:```bash
git submodule update --init vendor/rubocop
```