Commit 8ebe9fe9 authored by Ben Asher's avatar Ben Asher

spec fixes for git -C Core updates

parent 1f47b8af
...@@ -120,9 +120,15 @@ module Pod ...@@ -120,9 +120,15 @@ module Pod
it 'prints a warning if the update failed' do it 'prints a warning if the update failed' do
set_up_test_repo_for_update set_up_test_repo_for_update
Source.any_instance.stubs(:git).with(%w(rev-parse HEAD)).returns('aabbccd') Source.any_instance.stubs(:git).with do |options|
Source.any_instance.stubs(:git).with(%w(diff --name-only aabbccd..HEAD)).returns('') options.join(' ').should.equal %W(-C #{test_repo_path} rev-parse HEAD).join(' ')
MasterSource.any_instance.expects(:git!).with(%w(pull --ff-only)).raises(<<-EOS) end.returns('aabbccd')
Source.any_instance.stubs(:git).with do |options|
options.join(' ').should.equal %W(-C #{test_repo_path} diff --name-only aabbccd..HEAD).join(' ')
end.returns('')
MasterSource.any_instance.expects(:git!).with do |options|
options.join(' ').should.equal %W(-C #{test_repo_path} pull --ff-only).join(' ')
end.raises(<<-EOS)
fatal: '/dev/null' does not appear to be a git repository fatal: '/dev/null' does not appear to be a git repository
fatal: Could not read from remote repository. fatal: Could not read from remote repository.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment