diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-21 00:13:02 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-21 00:13:02 +0800 |
commit | 8ad92b95c92c6263d051c9f3045c9c2ad7e28f07 (patch) | |
tree | d7268348c763f5148d45dc2a916b40815aabd56d /spec/models | |
parent | ba962aa3f05bf325e0c435dfba5e9d939ab62085 (diff) | |
download | gitlab-ce-8ad92b95c92c6263d051c9f3045c9c2ad7e28f07.tar.gz |
Just put setup directly in the test, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5347#note_13202462
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index c25c971c606..76dc70ae893 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1133,19 +1133,17 @@ describe Project, models: true do let(:pipeline) { create_pipeline } context 'with many builds' do - before do + it 'gives the latest builds from latest pipeline' do pipeline1 = create_pipeline pipeline2 = create_pipeline - @build1_p2 = create_build(pipeline2, 'test') + build1_p2 = create_build(pipeline2, 'test') create_build(pipeline1, 'test') create_build(pipeline1, 'test2') - @build2_p2 = create_build(pipeline2, 'test2') - end + build2_p2 = create_build(pipeline2, 'test2') - it 'gives the latest builds from latest pipeline' do latest_builds = project.latest_successful_builds_for - expect(latest_builds).to contain_exactly(@build2_p2, @build1_p2) + expect(latest_builds).to contain_exactly(build2_p2, build1_p2) end end |