diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-09-12 18:52:43 -0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2017-09-20 13:21:54 +0200 |
commit | 34eeac6108c0ae764c7acf09a42e1151fc90d7fb (patch) | |
tree | 3dcb6771904c0ea1ec68dc794bb6c248b81124ff /spec/lib/gitlab/checks/force_push_spec.rb | |
parent | 36dc65d5ca34234faf8e79106ed081a28659d899 (diff) | |
download | gitlab-ce-34eeac6108c0ae764c7acf09a42e1151fc90d7fb.tar.gz |
Use Gitlab::Git's Popen on that module's codegitlab-git-popen
This allows the current Gitaly migration to depend on less code outside
of the Gitlab::Git module
Diffstat (limited to 'spec/lib/gitlab/checks/force_push_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/force_push_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/checks/force_push_spec.rb b/spec/lib/gitlab/checks/force_push_spec.rb index f8c8b83a3ac..2c7ef622c51 100644 --- a/spec/lib/gitlab/checks/force_push_spec.rb +++ b/spec/lib/gitlab/checks/force_push_spec.rb @@ -5,13 +5,13 @@ describe Gitlab::Checks::ForcePush do context "exit code checking", skip_gitaly_mock: true do it "does not raise a runtime error if the `popen` call to git returns a zero exit code" do - allow(Gitlab::Popen).to receive(:popen).and_return(['normal output', 0]) + allow_any_instance_of(Gitlab::Git::RevList).to receive(:popen).and_return(['normal output', 0]) expect { described_class.force_push?(project, 'oldrev', 'newrev') }.not_to raise_error end it "raises a runtime error if the `popen` call to git returns a non-zero exit code" do - allow(Gitlab::Popen).to receive(:popen).and_return(['error', 1]) + allow_any_instance_of(Gitlab::Git::RevList).to receive(:popen).and_return(['error', 1]) expect { described_class.force_push?(project, 'oldrev', 'newrev') }.to raise_error(RuntimeError) end |