Skip to content

Commit 060c68c

Browse files
committed
(CONT-790) Rubocop Manual Fixes 3 - RSpec/ContextWording
1 parent 1097849 commit 060c68c

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

.rubocop_todo.yml

-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 7
10-
# Configuration parameters: Prefixes, AllowedPatterns.
11-
# Prefixes: when, with, without
12-
RSpec/ContextWording:
13-
Exclude:
14-
- 'spec/acceptance/integration_ntp_spec.rb'
15-
- 'spec/classes/contains_spec.rb'
16-
- 'spec/classes/ntp_spec.rb'
17-
189
# Offense count: 9
1910
# Configuration parameters: IgnoredMetadata.
2011
RSpec/DescribeClass:

spec/acceptance/integration_ntp_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require 'pry'
66

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

@@ -22,7 +22,7 @@ class { 'ntp': }
2222
end
2323
end
2424

25-
context 'set up the client' do
25+
context 'when setting up the client' do
2626
before(:all) { change_target_host('ntpclient') }
2727
after(:all) { reset_target_host }
2828

spec/classes/contains_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
end
1414

1515
on_supported_os.each do |os, f|
16-
context "on #{os}" do
16+
context "when on #{os}" do
1717
let(:facts) do
1818
f.merge(super())
1919
end

spec/classes/ntp_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
end
1515
end
1616

17-
context "on #{os}" do
17+
context "when on #{os}" do
1818
let(:facts) do
1919
f.merge(super())
2020
end
@@ -102,7 +102,7 @@
102102
end
103103
end
104104

105-
context 'config_dir' do
105+
context 'with config_dir' do
106106
context 'when set to custom dir' do
107107
let(:params) do
108108
{
@@ -120,7 +120,7 @@
120120
end
121121
end
122122

123-
context 'config_file_mode' do
123+
context 'with config_file_mode' do
124124
context 'when set to custom mode' do
125125
let(:params) do
126126
{
@@ -134,7 +134,7 @@
134134
end
135135
end
136136

137-
context 'default pool servers' do
137+
context 'with default pool servers' do
138138
case f[:os]['family']
139139
when 'RedHat'
140140
it 'uses the centos ntp servers' do

0 commit comments

Comments
 (0)