Skip to content

Commit 7592cec

Browse files
authored
Merge pull request #1972 from corsonknowles/add_branch_coverage
Complete branch coverage for ContextWording
2 parents 5850cf3 + d3e4268 commit 7592cec

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/rubocop/cop/rspec/context_wording_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,17 @@
214214
end
215215
end
216216
end
217+
218+
context 'when `AllowedPatterns:` and `Prefixes:` are both empty' do
219+
let(:cop_config) do
220+
{ 'Prefixes' => [], 'AllowedPatterns' => [] }
221+
end
222+
223+
it 'skips any description' do
224+
expect_no_offenses(<<~RUBY)
225+
context 'arbitrary text' do
226+
end
227+
RUBY
228+
end
229+
end
217230
end

0 commit comments

Comments
 (0)