Commit 304c39b6 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix rubocop offenses in `StringPath` specs

parent 1cc26e0f
...@@ -72,19 +72,23 @@ describe Gitlab::StringPath do ...@@ -72,19 +72,23 @@ describe Gitlab::StringPath do
it { is_expected.to be_an_instance_of Array } it { is_expected.to be_an_instance_of Array }
it { is_expected.to all(be_an_instance_of described_class) } it { is_expected.to all(be_an_instance_of described_class) }
it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), it do
string_path('path/dir_1/file_b'), is_expected.to contain_exactly string_path('path/dir_1/file_1'),
string_path('path/dir_1/subdir/'), string_path('path/dir_1/file_b'),
string_path('path/dir_1/subdir/subfile') } string_path('path/dir_1/subdir/'),
string_path('path/dir_1/subdir/subfile')
end
end end
describe '#children' do describe '#children' do
subject { |example| path(example).children } subject { |example| path(example).children }
it { is_expected.to all(be_an_instance_of described_class) } it { is_expected.to all(be_an_instance_of described_class) }
it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), it do
string_path('path/dir_1/file_b'), is_expected.to contain_exactly string_path('path/dir_1/file_1'),
string_path('path/dir_1/subdir/') } string_path('path/dir_1/file_b'),
string_path('path/dir_1/subdir/')
end
end end
describe '#files' do describe '#files' do
...@@ -92,8 +96,10 @@ describe Gitlab::StringPath do ...@@ -92,8 +96,10 @@ describe Gitlab::StringPath do
it { is_expected.to all(be_file) } it { is_expected.to all(be_file) }
it { is_expected.to all(be_an_instance_of described_class) } it { is_expected.to all(be_an_instance_of described_class) }
it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), it do
string_path('path/dir_1/file_b') } is_expected.to contain_exactly string_path('path/dir_1/file_1'),
string_path('path/dir_1/file_b')
end
end end
describe '#directories' do describe '#directories' do
...@@ -109,8 +115,10 @@ describe Gitlab::StringPath do ...@@ -109,8 +115,10 @@ describe Gitlab::StringPath do
it { is_expected.to all(be_directory) } it { is_expected.to all(be_directory) }
it { is_expected.to all(be_an_instance_of described_class) } it { is_expected.to all(be_an_instance_of described_class) }
it { is_expected.to contain_exactly string_path('path/dir_1/subdir/'), it do
string_path('path/dir_1/../') } is_expected.to contain_exactly string_path('path/dir_1/subdir/'),
string_path('path/dir_1/../')
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment