Fix spec failure due to big directory size on travis

Listing the fixtures folder sorting by size, expected the files at the beginning
followed by the `symlinks` folder. But on travis, the folder is 4KiB which is
larger than any one of the files.

Keep the folder first by adding the `--group-directories-first` flag.
This commit is contained in:
Claudio Bley 2018-10-05 22:43:15 +02:00
parent 127eb510cd
commit 8eb0089fc5

View file

@ -123,9 +123,9 @@ RSpec.describe ColorLS::Flags do
end
context 'with --sort=size flag' do
let(:args) { ['--sort=size', FIXTURES] }
let(:args) { ['--sort=size', '--group-directories-first', FIXTURES] }
it { is_expected.to match(/a-file.+z-file.+symlinks/) } # sorts results by size
it { is_expected.to match(/symlinks.+a-file.+z-file/) } # sorts results by size
end
context 'with --sort=extension flag' do