Skip to content

Commit

Permalink
(CONT-790) Rubocop Manual Fixes 3 - RSpec/ContextWording
Browse files Browse the repository at this point in the history
  • Loading branch information
david22swan committed Apr 6, 2023
1 parent 1097849 commit 060c68c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +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: 7
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/acceptance/integration_ntp_spec.rb'
- 'spec/classes/contains_spec.rb'
- 'spec/classes/ntp_spec.rb'

# Offense count: 9
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/integration_ntp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'pry'

describe 'we are able to setup an ntp server, and connect a client to it', :integration do
context 'set up the server' do
context 'when setting up the server' do
before(:all) { change_target_host('ntpserver') }
after(:all) { reset_target_host }

Expand All @@ -22,7 +22,7 @@ class { 'ntp': }
end
end

context 'set up the client' do
context 'when setting up the client' do
before(:all) { change_target_host('ntpclient') }
after(:all) { reset_target_host }

Expand Down
2 changes: 1 addition & 1 deletion spec/classes/contains_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

on_supported_os.each do |os, f|
context "on #{os}" do
context "when on #{os}" do
let(:facts) do
f.merge(super())
end
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/ntp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
end
end

context "on #{os}" do
context "when on #{os}" do
let(:facts) do
f.merge(super())
end
Expand Down Expand Up @@ -102,7 +102,7 @@
end
end

context 'config_dir' do
context 'with config_dir' do
context 'when set to custom dir' do
let(:params) do
{
Expand All @@ -120,7 +120,7 @@
end
end

context 'config_file_mode' do
context 'with config_file_mode' do
context 'when set to custom mode' do
let(:params) do
{
Expand All @@ -134,7 +134,7 @@
end
end

context 'default pool servers' do
context 'with default pool servers' do
case f[:os]['family']
when 'RedHat'
it 'uses the centos ntp servers' do
Expand Down

0 comments on commit 060c68c

Please sign in to comment.