Skip to content

Commit

Permalink
Auto-correct rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Jan 25, 2023
1 parent b56ca56 commit 33d4ac0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/colorls/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def long_info(content)
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

Expand Down
2 changes: 1 addition & 1 deletion spec/color_ls/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
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)

Expand Down
6 changes: 3 additions & 3 deletions spec/color_ls/flags_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
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
Expand Down Expand Up @@ -338,7 +338,7 @@
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

Expand Down

0 comments on commit 33d4ac0

Please sign in to comment.