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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 18:06:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-27 18:06:16 +0300
commit8320f7956d72986f5a7c850874fce4f8b5a8e015 (patch)
treec761b309cfff422609d47a17ac4d6a732c142f49 /spec/lib/quality
parent45482d5a2704da7fabe4ccf07f85d9be6e0a791a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/quality')
-rw-r--r--spec/lib/quality/test_level_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/lib/quality/test_level_spec.rb b/spec/lib/quality/test_level_spec.rb
index 59870ce44a7..4db188bd8f2 100644
--- a/spec/lib/quality/test_level_spec.rb
+++ b/spec/lib/quality/test_level_spec.rb
@@ -4,6 +4,20 @@ require 'fast_spec_helper'
RSpec.describe Quality::TestLevel do
describe '#pattern' do
+ context 'when level is all' do
+ it 'returns a pattern' do
+ expect(subject.pattern(:all))
+ .to eq("spec/**{,/**/}*_spec.rb")
+ end
+ end
+
+ context 'when level is geo' do
+ it 'returns a pattern' do
+ expect(subject.pattern(:geo))
+ .to eq("spec/**{,/**/}*_spec.rb")
+ end
+ end
+
context 'when level is unit' do
it 'returns a pattern' do
expect(subject.pattern(:unit))
@@ -44,6 +58,20 @@ RSpec.describe Quality::TestLevel do
end
describe '#regexp' do
+ context 'when level is all' do
+ it 'returns a regexp' do
+ expect(subject.regexp(:all))
+ .to eq(%r{spec/})
+ end
+ end
+
+ context 'when level is geo' do
+ it 'returns a regexp' do
+ expect(subject.regexp(:geo))
+ .to eq(%r{spec/})
+ end
+ end
+
context 'when level is unit' do
it 'returns a regexp' do
expect(subject.regexp(:unit))