rubocop-rspec: RSpec/RepeatedDescription should not fire when using rspec-its
We are using rspec-its and after updating rubocop-rspec experienced a lot of reports for this rule violation.
We often use contexts and check the resulting objects for specific attribute values like so:
describe 'foo' do
subject { my_subject }
context 'bar' do
its(:attrib1) { is_expected.to eq 'value1' }
its(:attrib2) { is_expected.to eq 'value2' }
end
end
rubocop-rspec complaints about the two its-statements sharing the same description.
We do not expect this rule to pick up those autogenerated descriptions.
(EDIT: I updated this text to better reflect the problem. Please note that the comment below by @pirj is referring to the previous content of this description which was not specific enough.)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 17 (13 by maintainers)
@pirj sure, I was a little busy at work, but I believe that I can handle this in a week
@lazycoder9 Yet another interesting case to look at.
this code raises these problems