diff options
author | Rémy Coutable <remy@rymai.me> | 2018-11-29 18:39:00 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-28 20:15:51 +0300 |
commit | 95b5832366e4bd809bc55641e9c8cb93234b0330 (patch) | |
tree | 302700c4fa1eeb839e78d7782576fa032fb8fd30 /qa/spec | |
parent | 790a51a42778b3aa3fb5c8c5afe687ef06dd4433 (diff) |
[QA] Fail early if a Git command fails
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'qa/spec')
-rw-r--r-- | qa/spec/git/repository_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/spec/git/repository_spec.rb b/qa/spec/git/repository_spec.rb index 62c81050bd9..0ded33a73a2 100644 --- a/qa/spec/git/repository_spec.rb +++ b/qa/spec/git/repository_spec.rb @@ -39,7 +39,7 @@ describe QA::Git::Repository do describe '#clone' do it 'is unable to resolve host' do - expect(repository.clone).to include("fatal: unable to access 'http://root@foo/bar.git/'") + expect { repository.clone }.to raise_error(described_class::RepositoryCommandError, /The command .* failed \(128\) with the following output/) end end @@ -49,7 +49,7 @@ describe QA::Git::Repository do end it 'fails to push changes' do - expect(repository.push_changes).to include("error: failed to push some refs to 'http://root@foo/bar.git'") + expect { repository.push_changes }.to raise_error(described_class::RepositoryCommandError, /The command .* failed \(1\) with the following output/) end end |