mirror of
https://github.com/athityakumar/colorls.git
synced 2024-09-12 05:31:14 +02:00
Auto-correct rubocop offenses
This commit is contained in:
parent
b56ca560a1
commit
33d4ac066a
3 changed files with 5 additions and 5 deletions
|
@ -317,7 +317,7 @@ module ColorLS
|
|||
line_array.push links if @hard_links_count
|
||||
line_array.push user_info(content) if @show_user
|
||||
line_array.push group_info(content.group) if @show_group
|
||||
line_array.concat [size_info(content.size), mtime_info(content.mtime)]
|
||||
line_array.push(size_info(content.size), mtime_info(content.mtime))
|
||||
line_array.join(' ')
|
||||
end
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ RSpec.describe ColorLS::Core do
|
|||
executable?: false
|
||||
)
|
||||
|
||||
allow(::Dir).to receive(:entries).and_return([camera])
|
||||
allow(Dir).to receive(:entries).and_return([camera])
|
||||
|
||||
allow(ColorLS::FileInfo).to receive(:new).and_return(file_info)
|
||||
|
||||
|
|
|
@ -149,8 +149,8 @@ RSpec.describe ColorLS::Flags do
|
|||
end
|
||||
|
||||
it 'returns no user / group info' do
|
||||
allow(::Etc).to receive(:getpwuid).and_return(nil)
|
||||
allow(::Etc).to receive(:getgrgid).and_return(nil)
|
||||
allow(Etc).to receive(:getpwuid).and_return(nil)
|
||||
allow(Etc).to receive(:getgrgid).and_return(nil)
|
||||
|
||||
expect { subject }.to output(/\s+ \d+ \s+ \d+ .* a.txt/mx).to_stdout
|
||||
end
|
||||
|
@ -338,7 +338,7 @@ RSpec.describe ColorLS::Flags do
|
|||
let(:args) { ['--snafu'] }
|
||||
|
||||
it 'issues a warning, hint about `--help` and exit' do # rubocop:todo RSpec/MultipleExpectations
|
||||
allow(::Kernel).to receive(:warn) do |message|
|
||||
allow(Kernel).to receive(:warn) do |message|
|
||||
expect(message).to output '--snafu'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue