Skip to content

Commit

Permalink
Merge pull request #1770 from troessner/dependabot/bundler/rubocop-rs…
Browse files Browse the repository at this point in the history
…pec-tw-2.27.0

Update rubocop-rspec requirement from ~> 2.26.0 to ~> 2.27.0
  • Loading branch information
mvz committed Mar 3, 2024
2 parents 51ce587 + bd84d74 commit 361f3ac
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ group :development do
gem 'rspec-benchmark', '~> 0.6.0'
gem 'rubocop', '~> 1.61.0'
gem 'rubocop-performance', '~> 1.20.0'
gem 'rubocop-rspec', '~> 2.26.0'
gem 'rubocop-rspec', '~> 2.27.0'
gem 'simplecov', '>= 0.18.0', '< 0.23.0'
gem 'yard', '~> 0.9.5'

Expand Down
8 changes: 4 additions & 4 deletions spec/reek/report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
RSpec.describe Reek::Report do
describe '.report_class' do
it 'returns the correct class' do
expect(described_class.report_class(:text)).to eq Reek::Report::TextReport
expect(described_class.report_class(:text)).to eq described_class::TextReport
end
end

describe '.location_formatter' do
it 'returns the correct class' do
expect(described_class.location_formatter(:plain)).to eq Reek::Report::BlankLocationFormatter
expect(described_class.location_formatter(:plain)).to eq described_class::BlankLocationFormatter
end
end

describe '.heading_formatter' do
it 'returns the correct class' do
expect(described_class.heading_formatter(:quiet)).to eq Reek::Report::QuietHeadingFormatter
expect(described_class.heading_formatter(:quiet)).to eq described_class::QuietHeadingFormatter
end
end

describe '.warning_formatter_class' do
it 'returns the correct class' do
expect(described_class.warning_formatter_class(:simple)).to eq Reek::Report::SimpleWarningFormatter
expect(described_class.warning_formatter_class(:simple)).to eq described_class::SimpleWarningFormatter
end
end
end
8 changes: 4 additions & 4 deletions spec/reek/smell_detectors/duplicate_method_call_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def alfa

context 'when allowing up to 3 calls' do
let(:config) do
{ Reek::SmellDetectors::DuplicateMethodCall::MAX_ALLOWED_CALLS_KEY => 3 }
{ described_class::MAX_ALLOWED_CALLS_KEY => 3 }
end

it 'does not report double calls' do
Expand All @@ -191,19 +191,19 @@ def alfa

context 'when allowing calls to some methods' do
it 'does not report calls to some methods' do
config = { Reek::SmellDetectors::DuplicateMethodCall::ALLOW_CALLS_KEY => ['@bravo.charlie'] }
config = { described_class::ALLOW_CALLS_KEY => ['@bravo.charlie'] }
src = 'def alfa; @bravo.charlie + @bravo.charlie; end'
expect(src).not_to reek_of(:DuplicateMethodCall).with_config(config)
end

it 'reports calls to other methods' do
config = { Reek::SmellDetectors::DuplicateMethodCall::ALLOW_CALLS_KEY => ['@delta.charlie'] }
config = { described_class::ALLOW_CALLS_KEY => ['@delta.charlie'] }
src = 'def alfa; @bravo.charlie + @bravo.charlie; end'
expect(src).to reek_of(:DuplicateMethodCall, name: '@bravo.charlie').with_config(config)
end

it 'does not report calls to methods specifed with a regular expression' do
config = { Reek::SmellDetectors::DuplicateMethodCall::ALLOW_CALLS_KEY => [/charlie/] }
config = { described_class::ALLOW_CALLS_KEY => [/charlie/] }
src = 'def alfa; puts @bravo.charlie; puts @bravo.charlie; end'
expect(src).not_to reek_of(:DuplicateMethodCall, name: '@bravo.charlie').with_config(config)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/reek/smell_detectors/nested_iterators_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def alfa(bravo)

context 'when setting the allowed nesting depth to 3' do
let(:config) do
{ Reek::SmellDetectors::NestedIterators::MAX_ALLOWED_NESTING_KEY => 3 }
{ described_class::MAX_ALLOWED_NESTING_KEY => 3 }
end

it 'does not report nested iterators 3 levels deep' do
Expand Down Expand Up @@ -273,7 +273,7 @@ def alfa(bravo)

context 'when ignoring iterators' do
let(:config) do
{ Reek::SmellDetectors::NestedIterators::IGNORE_ITERATORS_KEY => ['ignore_me'] }
{ described_class::IGNORE_ITERATORS_KEY => ['ignore_me'] }
end

it 'does not report when nesting the ignored iterator inside another' do
Expand Down
2 changes: 1 addition & 1 deletion spec/reek/smell_detectors/too_many_constants_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RSpec.describe Reek::SmellDetectors::TooManyConstants do
let(:config) do
{ Reek::SmellDetectors::TooManyConstants::MAX_ALLOWED_CONSTANTS_KEY => 2 }
{ described_class::MAX_ALLOWED_CONSTANTS_KEY => 2 }
end

it 'reports the right values' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RSpec.describe Reek::SmellDetectors::TooManyInstanceVariables do
let(:config) do
{ Reek::SmellDetectors::TooManyInstanceVariables::MAX_ALLOWED_IVARS_KEY => 2 }
{ described_class::MAX_ALLOWED_IVARS_KEY => 2 }
end

it 'reports the right values' do
Expand Down
2 changes: 1 addition & 1 deletion spec/reek/smell_detectors/too_many_methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RSpec.describe Reek::SmellDetectors::TooManyMethods do
let(:config) do
{ Reek::SmellDetectors::TooManyMethods::MAX_ALLOWED_METHODS_KEY => 3 }
{ described_class::MAX_ALLOWED_METHODS_KEY => 3 }
end

it 'reports the right values' do
Expand Down
2 changes: 1 addition & 1 deletion spec/reek/smell_detectors/too_many_statements_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RSpec.describe Reek::SmellDetectors::TooManyStatements do
let(:config) do
{ Reek::SmellDetectors::TooManyStatements::MAX_ALLOWED_STATEMENTS_KEY => 2 }
{ described_class::MAX_ALLOWED_STATEMENTS_KEY => 2 }
end

it 'reports the right values' do
Expand Down
2 changes: 1 addition & 1 deletion spec/reek/smell_detectors/utility_function_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def bravo(charlie)

describe 'disabling UtilityFunction via configuration for non-public methods' do
let(:config) do
{ Reek::SmellDetectors::UtilityFunction::PUBLIC_METHODS_ONLY_KEY => true }
{ described_class::PUBLIC_METHODS_ONLY_KEY => true }
end

context 'when examining public methods' do
Expand Down

0 comments on commit 361f3ac

Please sign in to comment.