From 7e135b23f625982fd5be79345fd3670a7698ec61 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 21 Feb 2018 15:20:06 +0100 Subject: Change expect block in spec --- spec/requests/git_http_spec.rb | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index 08471339f5d..e812556ea76 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -160,15 +160,11 @@ describe 'Git HTTP requests' do it 'creates the repository' do FileUtils.rm_rf(wiki.repository.path) - # Sanity check, did we rm_rf correctly? - expect(wiki.repository.raw_repository.exists?).to eq(false) - - # This request should create the wiki repo as a side effect - download(path) do |response| - expect(response).to have_gitlab_http_status(:ok) - end - - expect(wiki.repository.raw_repository.exists?).to eq(true) + expect do + download(path) do |response| + expect(response).to have_gitlab_http_status(:ok) + end + end.to change(wiki.repository.raw_repository, :exists?).from(false).to(true) end end -- cgit v1.2.1