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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-23 15:44:12 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-23 15:44:12 +0300
commit8a2bc9b4457903dfdb0efc88c5ba816f4ba3141e (patch)
treeb2070a8ecb32449ecdb4a1bf7dc9c40afacee912 /spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
parent96d6193cabacc92f43bd441f48d63b226d9dad21 (diff)
Integration variables collections with expressions
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
index 475ac7afcb3..6685bf5385b 100644
--- a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb
@@ -1,22 +1,18 @@
require 'spec_helper'
describe Gitlab::Ci::Pipeline::Expression::Statement do
- let(:pipeline) { build(:ci_pipeline) }
-
subject do
- described_class.new(text, pipeline)
+ described_class.new(text, variables)
end
- before do
- variables = [{ key: 'PRESENT_VARIABLE', value: 'my variable' },
- { key: 'EMPTY_VARIABLE', value: '' }]
-
- pipeline.variables.build(variables)
+ let(:variables) do
+ { 'PRESENT_VARIABLE' => 'my variable',
+ EMPTY_VARIABLE: '' }
end
describe '.new' do
- context 'when pipeline is not provided' do
- it 'allows to properly initialize the statement' do
+ context 'when variables are not provided' do
+ it 'allows to properly initializes the statement' do
statement = described_class.new('$PRESENT_VARIABLE')
expect(statement.evaluate).to be_nil