Made tests more generic since file paths may be different on various
systems.
This commit is contained in:
@@ -438,7 +438,7 @@ describe 'homesick' do
|
|||||||
it 'should print an error message when trying to pull a non-existant castle' do
|
it 'should print an error message when trying to pull a non-existant castle' do
|
||||||
homesick.should_receive('say_status').once
|
homesick.should_receive('say_status').once
|
||||||
.with(:error,
|
.with(:error,
|
||||||
%r{Could not pull castle_repo, expected /tmp/construct_container.* exist and contain dotfiles},
|
%r{Could not pull castle_repo, expected .* exist and contain dotfiles},
|
||||||
:red)
|
:red)
|
||||||
expect { homesick.pull 'castle_repo' }.to raise_error(SystemExit)
|
expect { homesick.pull 'castle_repo' }.to raise_error(SystemExit)
|
||||||
end
|
end
|
||||||
@@ -470,7 +470,7 @@ describe 'homesick' do
|
|||||||
it 'should print an error message when trying to push a non-existant castle' do
|
it 'should print an error message when trying to push a non-existant castle' do
|
||||||
homesick.should_receive('say_status').once
|
homesick.should_receive('say_status').once
|
||||||
.with(:error,
|
.with(:error,
|
||||||
%r{Could not push castle_repo, expected /tmp/construct_container.* exist and contain dotfiles},
|
%r{Could not push castle_repo, expected .* exist and contain dotfiles},
|
||||||
:red)
|
:red)
|
||||||
expect { homesick.push 'castle_repo' }.to raise_error(SystemExit)
|
expect { homesick.push 'castle_repo' }.to raise_error(SystemExit)
|
||||||
end
|
end
|
||||||
@@ -631,7 +631,7 @@ describe 'homesick' do
|
|||||||
it 'returns an error message when the given castle does not exist' do
|
it 'returns an error message when the given castle does not exist' do
|
||||||
homesick.should_receive('say_status').once
|
homesick.should_receive('say_status').once
|
||||||
.with(:error,
|
.with(:error,
|
||||||
%r{Could not cd castle_repo, expected /tmp/construct_container.* exist and contain dotfiles},
|
%r{Could not cd castle_repo, expected .* exist and contain dotfiles},
|
||||||
:red)
|
:red)
|
||||||
expect { homesick.cd 'castle_repo' }.to raise_error(SystemExit)
|
expect { homesick.cd 'castle_repo' }.to raise_error(SystemExit)
|
||||||
end
|
end
|
||||||
@@ -664,7 +664,7 @@ describe 'homesick' do
|
|||||||
ENV.stub(:[]).with('EDITOR').and_return('vim')
|
ENV.stub(:[]).with('EDITOR').and_return('vim')
|
||||||
homesick.should_receive('say_status').once
|
homesick.should_receive('say_status').once
|
||||||
.with(:error,
|
.with(:error,
|
||||||
%r{Could not open castle_repo, expected /tmp/construct_container.* exist and contain dotfiles},
|
%r{Could not open castle_repo, expected .* exist and contain dotfiles},
|
||||||
:red)
|
:red)
|
||||||
expect { homesick.open 'castle_repo' }.to raise_error(SystemExit)
|
expect { homesick.open 'castle_repo' }.to raise_error(SystemExit)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user