Reduce redundancy in flag tests

This commit is contained in:
Henré Botha 2017-10-22 20:48:17 +02:00
parent 30ac4ac7ba
commit c866b12d8c

View file

@ -18,12 +18,10 @@ RSpec.describe ColorLS::Flags do
let(:args) { [FIXTURES] }
it { is_expected.to_not match(/((r|-).*(w|-).*(x|-).*){3}/) } # does not list file info
it { is_expected.to_not match(/\.hidden-file/) } # does not list hidden files
it { is_expected.to_not match(/Found \d+ contents/) } # does not show a report
it { is_expected.to match(/a-file.+symlinks.+z-file/) } # sorts all results alphabetically
it { is_expected.to match(/a-file.+symlinks/) } # displays dirs & files
it { is_expected.to_not match(/(.*\n){3}/) } # displays multiple files per line
it { is_expected.to_not match(/\.hidden-file/) } # does not display hidden files
it { is_expected.to_not match(/Found \d+ contents/) } # does not show a report
it { is_expected.to match(/a-file.+symlinks.+z-file/) } # displays dirs & files alphabetically
it { is_expected.to_not match(/(.*\n){3}/) } # displays multiple files per line
it { is_expected.to_not match(%r(\.{1,2}/)) } # does not display ./ or ../
it { is_expected.to_not match(/├──/) } # does not display file hierarchy
end