diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-20 00:29:36 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-20 00:29:36 +0800 |
commit | c3c0406a7e4ead20aae1b06a590ee346cb2f4b75 (patch) | |
tree | 0eab99ae26ad5655708ca25cbc1e9910d64865c5 | |
parent | cd449a736b375094d26d5fc62f973e00e0fb207a (diff) | |
download | gitlab-ce-c3c0406a7e4ead20aae1b06a590ee346cb2f4b75.tar.gz |
Use let! feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347/diffs#note_13173336
let! is not very flexible but I guess it's fine since this is not in
top-level anyway.
-rw-r--r-- | spec/models/build_spec.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index ac148cec6b0..7333a8151cc 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -675,14 +675,10 @@ describe Ci::Build, models: true do end describe 'Project#latest_successful_builds_for' do - let(:build) do + let!(:build) do create(:ci_build, :artifacts, :success, pipeline: pipeline) end - before do - build - end - context 'with succeed pipeline' do it 'returns builds from ref' do builds = project.latest_successful_builds_for('fix') |