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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user