mirror of
https://github.com/athityakumar/colorls.git
synced 2024-09-12 05:31:14 +02:00
spec: add spec to flags spec
This commit is contained in:
parent
0421206076
commit
7eda794a07
2 changed files with 8 additions and 0 deletions
|
@ -140,6 +140,14 @@ RSpec.describe ColorLS::Flags do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with --long and --non-human-readable flag for `2MB file`' do
|
||||||
|
let(:args) { ['--long', '--non-human-readable', "#{FIXTURES}/two_megabyte_file.txt"] }
|
||||||
|
|
||||||
|
it 'shows the file size in bytes' do
|
||||||
|
expect { subject }.to output(/#{2 * 1024 * 1024} B/).to_stdout
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with --long flag on windows' do
|
context 'with --long flag on windows' do
|
||||||
let(:args) { ['--long', "#{FIXTURES}/a.txt"] }
|
let(:args) { ['--long', "#{FIXTURES}/a.txt"] }
|
||||||
|
|
||||||
|
|
BIN
spec/fixtures/two_megabyte_file.txt
vendored
Normal file
BIN
spec/fixtures/two_megabyte_file.txt
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue