Skip to content

Commit

Permalink
(CAT-1644) - Disable RSpec/BeforeAfterAll inline
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Dec 20, 2023
1 parent 96bb448 commit 12e0417
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 25 deletions.
10 changes: 0 additions & 10 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,26 @@ AllCops:

Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Naming/MethodParameterName:
AllowedNames:
- is

Lint/NestedMethodDefinition:
Exclude:
- 'lib/puppet/resource_api.rb'

Layout/LineLength:
Max: 200
RSpec/MessageSpies:
Expand Down
11 changes: 0 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 4
RSpec/BeforeAfterAll:
Exclude:
- '**/spec/spec_helper.rb'
- '**/spec/rails_helper.rb'
- '**/spec/support/**/*.rb'
- 'spec/acceptance/device_spec.rb'
- 'spec/acceptance/multi_device_spec.rb'
- 'spec/acceptance/transport/transport_defaults_spec.rb'
- 'spec/acceptance/transport/transport_spec.rb'

# Offense count: 25
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/device_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'ensure_param=present variant_pattern_param=0xAE321EEF url_param="https://www.google.com"'
end

before(:all) do
before(:all) do # rubocop:disable RSpec/BeforeAfterAll
if Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('5.3.0') && Gem::Version.new(Puppet::PUPPETVERSION) < Gem::Version.new('5.4.0')
# work around https://tickets.puppetlabs.com/browse/PUP-8632 and https://tickets.puppetlabs.com/browse/PUP-9047
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/the_node/state'))
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/multi_device_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RSpec.describe 'exercising a type with device-specific providers' do
let(:common_args) { '--verbose --trace --strict=error --modulepath spec/fixtures' }

before(:all) do
before(:all) do # rubocop:disable RSpec/BeforeAfterAll
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/some_node/state'))
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/other_node/state'))
end
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/transport/transport_defaults_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
RSpec.describe 'a transport' do
let(:common_args) { '--verbose --trace --debug --strict=error --modulepath spec/fixtures' }

before(:all) do
before(:all) do # rubocop:disable RSpec/BeforeAfterAll
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/the_node/state'))
end

Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/transport/transport_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
RSpec.describe 'a transport' do
let(:common_args) { '--verbose --trace --debug --strict=error --modulepath spec/fixtures' }

before(:all) do
before(:all) do # rubocop:disable RSpec/BeforeAfterAll
FileUtils.mkdir_p(File.expand_path('~/.puppetlabs/opt/puppet/cache/devices/the_node/state'))
end

Expand Down

0 comments on commit 12e0417

Please sign in to comment.