summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r--spec/lib/gitlab/string_path_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/lib/gitlab/string_path_spec.rb b/spec/lib/gitlab/string_path_spec.rb
index a54bf109c80..861eb951236 100644
--- a/spec/lib/gitlab/string_path_spec.rb
+++ b/spec/lib/gitlab/string_path_spec.rb
@@ -32,6 +32,7 @@ describe Gitlab::StringPath do
it { is_expected.to be_file }
it { is_expected.to have_parent }
it { is_expected.to_not have_descendants }
+ it { is_expected.to exist }
describe '#basename' do
subject { |example| path(example).basename }
@@ -170,4 +171,16 @@ describe Gitlab::StringPath do
it { is_expected.to eq '/path/file1' }
end
+
+ describe '#exists?', path: 'another_file' do
+ subject { |example| path(example).exists? }
+ it { is_expected.to be true }
+ end
+
+ describe '#exists?', path: './non_existent/' do
+ let(:universe) { ['./something'] }
+ subject { |example| path(example).exists? }
+
+ it { is_expected.to be false }
+ end
end