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