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:
@@ -11,7 +11,7 @@ describe DebatesController do
|
||||
InvisibleCaptcha.timestamp_enabled = true
|
||||
end
|
||||
|
||||
it 'should create an ahoy event' do
|
||||
it 'creates an ahoy event' do
|
||||
|
||||
sign_in create(:user)
|
||||
|
||||
@@ -26,7 +26,7 @@ describe DebatesController do
|
||||
Setting['max_ratio_anon_votes_on_debates'] = 50
|
||||
end
|
||||
|
||||
it 'should allow vote if user is allowed' do
|
||||
it 'allows vote if user is allowed' do
|
||||
Setting["max_ratio_anon_votes_on_debates"] = 100
|
||||
debate = create(:debate)
|
||||
sign_in create(:user)
|
||||
@@ -36,7 +36,7 @@ describe DebatesController do
|
||||
end.to change { debate.reload.votes_for.size }.by(1)
|
||||
end
|
||||
|
||||
it 'should not allow vote if user is not allowed' do
|
||||
it 'does not allow vote if user is not allowed' do
|
||||
Setting["max_ratio_anon_votes_on_debates"] = 0
|
||||
debate = create(:debate, cached_votes_total: 1000)
|
||||
sign_in create(:user)
|
||||
|
||||
Reference in New Issue
Block a user