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

@@ -17,7 +17,7 @@ describe Legislation::Question do
expect do
question.destroy
end.to change { Legislation::Question.count }.by(-1)
end.to change { described_class.count }.by(-1)
end
example "when it has options but no answers" do
@@ -26,7 +26,7 @@ describe Legislation::Question do
expect do
question.destroy
end.to change { Legislation::Question.count }.by(-1)
end.to change { described_class.count }.by(-1)
end
example "when it has options and answers" do
@@ -37,7 +37,7 @@ describe Legislation::Question do
expect do
question.destroy
end.to change { Legislation::Question.count }.by(-1)
end.to change { described_class.count }.by(-1)
end
end