summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
authorLeandro Camargo <leandroico@gmail.com>2016-11-26 01:02:08 -0200
committerLeandro Camargo <leandroico@gmail.com>2017-01-25 01:07:44 -0200
commitf1e920ed86133bfea0abfc66ca44282813822073 (patch)
treefe6f35c9af1aa1d3d96e6f405692717299b80cc0 /spec/models/ci
parentbb12ee051f95ee747c0e2b98a85675de53dca8ea (diff)
downloadgitlab-ce-f1e920ed86133bfea0abfc66ca44282813822073.tar.gz
Simplify coverage setting and comply to some requests in code review
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/build_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 9e5481017e2..7c054dd95f5 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -222,9 +222,10 @@ describe Ci::Build, :models do
end
describe '#coverage_regex' do
- subject { build.coverage_regex }
+ subject { build.coverage_regex }
+
let(:project_regex) { '\(\d+\.\d+\) covered' }
- let(:build_regex) { 'Code coverage: \d+\.\d+' }
+ let(:build_regex) { 'Code coverage: \d+\.\d+' }
context 'when project has build_coverage_regex set' do
before { project.build_coverage_regex = project_regex }
@@ -235,7 +236,7 @@ describe Ci::Build, :models do
context 'but coverage_regex attribute is also set' do
before { build.coverage_regex = build_regex }
- it { is_expected.to eq(build_regex) }
+ it { is_expected.to eq(build_regex) }
end
end