Enables RSpec/ExampleWording and fixes all issues

Both avoiding 'should' and repiting 'it' on the tests description
improves reading them and also makes all descriptions consistent.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
This commit is contained in:
Bertocq
2018-01-07 00:57:50 +01:00
parent 971f2e308a
commit ed16a78f42
73 changed files with 482 additions and 479 deletions

View File

@@ -10,7 +10,7 @@ describe CommentsController do
@unverified_user = create(:user)
end
it 'should create an comment if the comments are open' do
it 'creates an comment if the comments are open' do
sign_in @user
expect do
@@ -18,7 +18,7 @@ describe CommentsController do
end.to change { @question.reload.comments_count }.by(1)
end
it 'should not create a comment if the comments are closed' do
it 'does not create a comment if the comments are closed' do
sign_in @user
@process.update_attribute(:debate_end_date, Date.current - 1.day)
@@ -27,7 +27,7 @@ describe CommentsController do
end.to_not change { @question.reload.comments_count }
end
it 'should not create a comment for unverified users when the commentable requires it' do
it 'does not create a comment for unverified users when the commentable requires it' do
sign_in @unverified_user
expect do