Skip to content

Commit

Permalink
Merge pull request #1972 from corsonknowles/add_branch_coverage
Browse files Browse the repository at this point in the history
Complete branch coverage for ContextWording
  • Loading branch information
ydah authored Oct 21, 2024
2 parents 5850cf3 + d3e4268 commit 7592cec
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/rubocop/cop/rspec/context_wording_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,17 @@
end
end
end

context 'when `AllowedPatterns:` and `Prefixes:` are both empty' do
let(:cop_config) do
{ 'Prefixes' => [], 'AllowedPatterns' => [] }
end

it 'skips any description' do
expect_no_offenses(<<~RUBY)
context 'arbitrary text' do
end
RUBY
end
end
end

0 comments on commit 7592cec

Please sign in to comment.