summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorLeandro Camargo <leandroico@gmail.com>2016-12-05 02:00:47 -0200
committerLeandro Camargo <leandroico@gmail.com>2017-01-25 01:07:44 -0200
commit6323cd7203dbf1850e7939e81db4b1a9c6cf6d76 (patch)
treeca9a9450c85337fcaab7c9ecc83d92903826d06e /spec/lib
parentf1e920ed86133bfea0abfc66ca44282813822073 (diff)
downloadgitlab-ce-6323cd7203dbf1850e7939e81db4b1a9c6cf6d76.tar.gz
Comply to more requirements and requests made in the code review
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/ci/gitlab_ci_yaml_processor_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index ac706216d5a..3ffcfaa1f29 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -12,14 +12,19 @@ module Ci
let(:config) { YAML.dump(config_base) }
context 'when config has coverage set at the global scope' do
- before { config_base.update(coverage: '\(\d+\.\d+\) covered') }
+ before do
+ config_base.update(coverage: '\(\d+\.\d+\) covered')
+ end
context "and 'rspec' job doesn't have coverage set" do
it { is_expected.to include(coverage_regex: '\(\d+\.\d+\) covered') }
end
context 'but \'rspec\' job also has coverage set' do
- before { config_base[:rspec][:coverage] = '/Code coverage: \d+\.\d+/' }
+ before do
+ config_base[:rspec][:coverage] = '/Code coverage: \d+\.\d+/'
+ end
+
it { is_expected.to include(coverage_regex: 'Code coverage: \d+\.\d+') }
end
end