From f9ddf689da1edc68c81444a25b3b0d3841382c56 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 4 Jun 2021 18:10:08 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/expand_variables_spec.rb | 40 ++------------------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) (limited to 'spec/lib/expand_variables_spec.rb') 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 -- cgit v1.2.1