Commit df66e911 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve specs for pipeline expression statement

parent bd17ff3d
...@@ -2,7 +2,6 @@ require 'spec_helper' ...@@ -2,7 +2,6 @@ require 'spec_helper'
describe Gitlab::Ci::Pipeline::Expression::Statement do describe Gitlab::Ci::Pipeline::Expression::Statement do
let(:pipeline) { build(:ci_pipeline) } let(:pipeline) { build(:ci_pipeline) }
let(:text) { '$VAR "text"' }
subject do subject do
described_class.new(text, pipeline) described_class.new(text, pipeline)
...@@ -74,10 +73,12 @@ describe Gitlab::Ci::Pipeline::Expression::Statement do ...@@ -74,10 +73,12 @@ describe Gitlab::Ci::Pipeline::Expression::Statement do
] ]
statements.each do |expression, value| statements.each do |expression, value|
it "evaluates `#{expression}` to `#{value}`" do context "when using expression `#{expression}`" do
statement = described_class.new(expression, pipeline) 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment