diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-27 10:38:16 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-02-27 10:38:16 +0100 |
commit | df66e91129b12aeb64b2cd06e794cb5b57d62bca (patch) | |
tree | 7fecda60152f188e3b83e7ed727901f5f1e1e374 /spec | |
parent | bd17ff3d52b628ff3a0f7eb521f161ace0bf63e2 (diff) | |
download | gitlab-ce-df66e91129b12aeb64b2cd06e794cb5b57d62bca.tar.gz |
Improve specs for pipeline expression statement
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb index 84a4f2bcdf6..472a58599d8 100644 --- a/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb +++ b/spec/lib/gitlab/ci/pipeline/expression/statement_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe Gitlab::Ci::Pipeline::Expression::Statement do let(:pipeline) { build(:ci_pipeline) } - let(:text) { '$VAR "text"' } subject do described_class.new(text, pipeline) @@ -74,10 +73,12 @@ describe Gitlab::Ci::Pipeline::Expression::Statement do ] statements.each do |expression, value| - it "evaluates `#{expression}` to `#{value}`" do - statement = described_class.new(expression, pipeline) + context "when using expression `#{expression}`" do + let(:text) { expression } - expect(statement.evaluate).to eq value + it "evaluates to `#{value.inspect}`" do + expect(subject.evaluate).to eq value + end end end end |