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

@@ -4,7 +4,7 @@ describe Management::BaseController do
describe 'managed_user' do
it "should return existent user with session document info if present" do
it "returns existent user with session document info if present" do
session[:document_type] = "1"
session[:document_number] = "333333333E"
user = create(:user, :level_two, document_number: "333333333E")
@@ -13,7 +13,7 @@ describe Management::BaseController do
expect(managed_user).to eq user
end
it "should return new user if no user have the session document info" do
it "returns new user if no user have the session document info" do
session[:document_type] = "1"
session[:document_number] = "333333333E"
managed_user = subject.send(:managed_user)