From 304c39b6dc5878664c0dace4e3af6bdd2fa395f0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 22 Dec 2015 13:56:54 +0100 Subject: Fix rubocop offenses in `StringPath` specs --- spec/lib/gitlab/string_path_spec.rb | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/spec/lib/gitlab/string_path_spec.rb b/spec/lib/gitlab/string_path_spec.rb index c1722977576..8290aab7701 100644 --- a/spec/lib/gitlab/string_path_spec.rb +++ b/spec/lib/gitlab/string_path_spec.rb @@ -72,19 +72,23 @@ describe Gitlab::StringPath do it { is_expected.to be_an_instance_of Array } it { is_expected.to all(be_an_instance_of described_class) } - it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), - string_path('path/dir_1/file_b'), - string_path('path/dir_1/subdir/'), - string_path('path/dir_1/subdir/subfile') } + it do + is_expected.to contain_exactly string_path('path/dir_1/file_1'), + string_path('path/dir_1/file_b'), + string_path('path/dir_1/subdir/'), + string_path('path/dir_1/subdir/subfile') + end end describe '#children' do subject { |example| path(example).children } it { is_expected.to all(be_an_instance_of described_class) } - it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), - string_path('path/dir_1/file_b'), - string_path('path/dir_1/subdir/') } + it do + is_expected.to contain_exactly string_path('path/dir_1/file_1'), + string_path('path/dir_1/file_b'), + string_path('path/dir_1/subdir/') + end end describe '#files' do @@ -92,8 +96,10 @@ describe Gitlab::StringPath do it { is_expected.to all(be_file) } it { is_expected.to all(be_an_instance_of described_class) } - it { is_expected.to contain_exactly string_path('path/dir_1/file_1'), - string_path('path/dir_1/file_b') } + it do + is_expected.to contain_exactly string_path('path/dir_1/file_1'), + string_path('path/dir_1/file_b') + end end describe '#directories' do @@ -109,8 +115,10 @@ describe Gitlab::StringPath do it { is_expected.to all(be_directory) } it { is_expected.to all(be_an_instance_of described_class) } - it { is_expected.to contain_exactly string_path('path/dir_1/subdir/'), - string_path('path/dir_1/../') } + it do + is_expected.to contain_exactly string_path('path/dir_1/subdir/'), + string_path('path/dir_1/../') + end end end -- cgit v1.2.1