Skip to content

Commit

Permalink
Use RuboCop RSpec 2.26
Browse files Browse the repository at this point in the history
This commit makes this repo to use RuboCop RSpec 2.26 and suppress the following new offenses:

```console
$ bundle exec rubocop
(snip)

spec/project_spec.rb:261:11: C: [Correctable] RSpec/ExampleWording:
Do not use the future tense when describing your tests.
      it 'will not have a directory' do
          ^^^^^^^^^^^^^^^^^^^^^^^^^
spec/rubocop/cop/performance/count_spec.rb:185:9: C: [Correctable] RSpec/ExampleWording:
Do not use the future tense when describing your tests.
    it 'will not raise an error for Bundler.setup' do
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/rubocop/cop/performance/count_spec.rb:189:9: C: [Correctable] RSpec/ExampleWording:
Do not use the future tense when describing your tests.
    it 'will not raise an error for RakeTask.new' do
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
  • Loading branch information
koic committed Jan 7, 2024
1 parent 43e8786 commit b69aabb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem 'bump', require: false
gem 'rake'
gem 'rspec'
gem 'rubocop', github: 'rubocop/rubocop'
gem 'rubocop-rspec', '~> 2.25.0'
gem 'rubocop-rspec', '~> 2.26.0'
gem 'simplecov'
gem 'test-queue'
gem 'yard', '~> 0.9'
Expand Down
2 changes: 1 addition & 1 deletion spec/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@

dir = File.expand_path('../changelog', __dir__)

it 'will not have a directory' do
it 'does not have a directory' do
expect(Dir["#{dir}/*"].none? { |path| File.directory?(path) }).to be(true)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/rubocop/cop/performance/count_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ def count(&block)
end

context 'properly parses non related code' do
it 'will not raise an error for Bundler.setup' do
it 'does not raise an error for Bundler.setup' do
expect { inspect_source('Bundler.setup(:default, :development)') }.not_to raise_error
end

it 'will not raise an error for RakeTask.new' do
it 'does not raise an error for RakeTask.new' do
expect { inspect_source('RakeTask.new(:spec)') }.not_to raise_error
end
end
Expand Down

0 comments on commit b69aabb

Please sign in to comment.