Enable RSpec/NotToNot cop and fix all issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
This commit is contained in:
@@ -24,7 +24,7 @@ describe CommentsController do
|
||||
|
||||
expect do
|
||||
xhr :post, :create, comment: {commentable_id: @question.id, commentable_type: "Legislation::Question", body: "a comment"}
|
||||
end.to_not change { @question.reload.comments_count }
|
||||
end.not_to change { @question.reload.comments_count }
|
||||
end
|
||||
|
||||
it 'does not create a comment for unverified users when the commentable requires it' do
|
||||
@@ -32,7 +32,7 @@ describe CommentsController do
|
||||
|
||||
expect do
|
||||
xhr :post, :create, comment: {commentable_id: @question.id, commentable_type: "Legislation::Question", body: "a comment"}
|
||||
end.to_not change { @question.reload.comments_count }
|
||||
end.not_to change { @question.reload.comments_count }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user