summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-03 17:24:59 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-08-03 17:24:59 +0800
commit853b0dffe787aa185d299ac1868619a231b6965b (patch)
treea12186492e33a0b5f86379ed1338adbf40ab176c
parent62f115dd25c4d3639dceac1b3b81c9fe42eeedd3 (diff)
downloadgitlab-ce-853b0dffe787aa185d299ac1868619a231b6965b.tar.gz
Use when instead of if, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620/diffs#note_13540211
-rw-r--r--spec/models/build_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb
index 47c489e6af1..1837986e0f4 100644
--- a/spec/models/build_spec.rb
+++ b/spec/models/build_spec.rb
@@ -853,7 +853,7 @@ describe Ci::Build, models: true do
describe '#when' do
subject { build.when }
- context 'if is undefined' do
+ context 'when `when` is undefined' do
before do
build.update(when: nil)
build.reload # reload pipeline so that it resets config_processor
@@ -864,13 +864,13 @@ describe Ci::Build, models: true do
stub_ci_pipeline_yaml_file(config)
end
- context 'if config is not found' do
+ context 'when config is not found' do
let(:config) { nil }
it { is_expected.to eq('on_success') }
end
- context 'if config does not have a questioned job' do
+ context 'when config does not have a questioned job' do
let(:config) do
YAML.dump({
test_other: {
@@ -882,7 +882,7 @@ describe Ci::Build, models: true do
it { is_expected.to eq('on_success') }
end
- context 'if config has when' do
+ context 'when config has when' do
let(:config) do
YAML.dump({
test: {