diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/expand_variables_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/lib/expand_variables_spec.rb')
-rw-r--r-- | spec/lib/expand_variables_spec.rb | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/spec/lib/expand_variables_spec.rb b/spec/lib/expand_variables_spec.rb index 407187ea05f..1108d26b2a9 100644 --- a/spec/lib/expand_variables_spec.rb +++ b/spec/lib/expand_variables_spec.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'spec_helper' +require 'fast_spec_helper' +require 'rspec-parameterized' RSpec.describe ExpandVariables do shared_examples 'common variable expansion' do |expander| @@ -231,41 +232,4 @@ RSpec.describe ExpandVariables do end end end - - describe '#possible_var_reference?' do - context 'table tests' do - using RSpec::Parameterized::TableSyntax - - where do - { - "empty value": { - value: '', - result: false - }, - "normal value": { - value: 'some value', - result: false - }, - "simple expansions": { - value: 'key$variable', - result: true - }, - "complex expansions": { - value: 'key${variable}${variable2}', - result: true - }, - "complex expansions for Windows": { - value: 'key%variable%%variable2%', - result: true - } - } - end - - with_them do - subject { ExpandVariables.possible_var_reference?(value) } - - it { is_expected.to eq(result) } - end - end - end end |