Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-04 15:40:42 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 14:48:15 +0300
commitf948c00757ca9529817c7368610b0c0d6734d48f (patch)
treeb163f8e0c65fd2405efc92bab5da9926241f88b6 /spec
parenta7f99b67a0bf1160f41ebf4dc92c618eb13a7a10 (diff)
Do not depend on universe when checking parent in `StringPath`
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/string_path_spec.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/lib/gitlab/string_path_spec.rb b/spec/lib/gitlab/string_path_spec.rb
index 0ef2155cb9b..a54bf109c80 100644
--- a/spec/lib/gitlab/string_path_spec.rb
+++ b/spec/lib/gitlab/string_path_spec.rb
@@ -30,7 +30,7 @@ describe Gitlab::StringPath do
it { is_expected.to be_absolute }
it { is_expected.to_not be_relative }
it { is_expected.to be_file }
- it { is_expected.to_not have_parent }
+ it { is_expected.to have_parent }
it { is_expected.to_not have_descendants }
describe '#basename' do
@@ -140,6 +140,21 @@ describe Gitlab::StringPath do
end
end
+ describe '#nodes', path: './' do
+ subject { |example| path(example).nodes }
+ it { is_expected.to eq 1 }
+ end
+
+ describe '#nodes', path: './test' do
+ subject { |example| path(example).nodes }
+ it { is_expected.to eq 2 }
+ end
+
+ describe '#nodes', path: './test/' do
+ subject { |example| path(example).nodes }
+ it { is_expected.to eq 2 }
+ end
+
describe '#metadata' do
let(:universe) do
['path/', 'path/file1', 'path/file2']