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