diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 15:06:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-27 15:06:16 +0000 |
commit | 8320f7956d72986f5a7c850874fce4f8b5a8e015 (patch) | |
tree | c761b309cfff422609d47a17ac4d6a732c142f49 /spec/lib/quality | |
parent | 45482d5a2704da7fabe4ccf07f85d9be6e0a791a (diff) | |
download | gitlab-ce-8320f7956d72986f5a7c850874fce4f8b5a8e015.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/quality')
-rw-r--r-- | spec/lib/quality/test_level_spec.rb | 28 |
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)) |