summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/trace
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-06 01:57:39 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-05-24 20:10:14 +0900
commita1cddf051e6a4a2e0cb3a20efb9f323328fa4bce (patch)
treed6ef8cdc3aef6f2795d838accdf76fa14a36995c /spec/lib/gitlab/ci/trace
parent34939c89324b856604b8ed55be5aaaec7ac0dd96 (diff)
downloadgitlab-ce-a1cddf051e6a4a2e0cb3a20efb9f323328fa4bce.tar.gz
Reproduced
Diffstat (limited to 'spec/lib/gitlab/ci/trace')
-rw-r--r--spec/lib/gitlab/ci/trace/stream_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/lib/gitlab/ci/trace/stream_spec.rb b/spec/lib/gitlab/ci/trace/stream_spec.rb
index 40ac5a3ed37..a607f000431 100644
--- a/spec/lib/gitlab/ci/trace/stream_spec.rb
+++ b/spec/lib/gitlab/ci/trace/stream_spec.rb
@@ -240,10 +240,18 @@ describe Gitlab::Ci::Trace::Stream do
end
context 'multiple results in content & regex' do
- let(:data) { ' (98.39%) covered. (98.29%) covered' }
+ let(:data) do
+ <<~HEREDOC
+ (98.39%) covered
+ (98.29%) covered
+ HEREDOC
+ end
+
let(:regex) { '\(\d+.\d+\%\) covered' }
- it { is_expected.to eq("98.29") }
+ it 'returns the last matched coverage' do
+ is_expected.to eq("98.29")
+ end
end
context 'using a regex capture' do