diff --git a/spec/color_ls/flags_spec.rb b/spec/color_ls/flags_spec.rb index 0677953..cb564c3 100644 --- a/spec/color_ls/flags_spec.rb +++ b/spec/color_ls/flags_spec.rb @@ -140,6 +140,14 @@ RSpec.describe ColorLS::Flags do 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 let(:args) { ['--long', "#{FIXTURES}/a.txt"] } diff --git a/spec/fixtures/two_megabyte_file.txt b/spec/fixtures/two_megabyte_file.txt new file mode 100644 index 0000000..3301331 Binary files /dev/null and b/spec/fixtures/two_megabyte_file.txt differ