diff options
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 |