-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Rubocop/Style 1 #20338
Fix Rubocop/Style 1 #20338
Conversation
Generated by 🚫 Danger |
@@ -63,8 +63,7 @@ | |||
end | |||
|
|||
it 'returns error when token was not stored locally' do | |||
allow_any_instance_of(File).to receive(:write).with(any_args).and_raise(TokenStorageError) | |||
allow_any_instance_of(File).to receive(:read).with(any_args).and_raise(TokenStorageError) | |||
allow(File).to receive(:write).and_raise(Errno::ENOENT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File methods don't specifically raise TokenStorageError
, so I chose an error it could potentially raise (though it doesn't really matter).
Summary
Style/CollectionCompact
Style/ConcatArrayLiterals
push
instead ofconcat
Style/FetchEnvVar
ENV.fetch('service')
orENV.fetch('service', nil)
instead ofENV['service']
.Style/FileRead
File.read
/File.binread
Style/FileWrite
File.write
/File.binwrite
Related issue(s)