diff options
author | Leandro Camargo <leandroico@gmail.com> | 2016-11-26 01:02:08 -0200 |
---|---|---|
committer | Leandro Camargo <leandroico@gmail.com> | 2017-01-25 01:07:44 -0200 |
commit | f1e920ed86133bfea0abfc66ca44282813822073 (patch) | |
tree | fe6f35c9af1aa1d3d96e6f405692717299b80cc0 /spec/models/ci | |
parent | bb12ee051f95ee747c0e2b98a85675de53dca8ea (diff) | |
download | gitlab-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.rb | 7 |
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 |