Enables RSpec/DescribedClass cop & fixes all issues

Autocorrection for existing issues, and stashing at .rubocop_todo.yml
the false positives

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/DescribedClass
This commit is contained in:
Bertocq
2018-01-07 00:38:19 +01:00
parent 0c3dc56650
commit 265d4d0967
38 changed files with 327 additions and 316 deletions

View File

@@ -117,7 +117,7 @@ describe Poll::Voter do
voter2 = create(:poll_voter, origin: "web")
voter3 = create(:poll_voter, origin: "booth")
web_voters = Poll::Voter.web
web_voters = described_class.web
expect(web_voters.count).to eq(2)
expect(web_voters).to include(voter1)
@@ -132,7 +132,7 @@ describe Poll::Voter do
voter2 = create(:poll_voter, origin: "booth")
voter3 = create(:poll_voter, origin: "web")
booth_voters = Poll::Voter.booth
booth_voters = described_class.booth
expect(booth_voters.count).to eq(2)
expect(booth_voters).to include(voter1)