Fix broken specs

This commit is contained in:
Fabio Rehm 2013-10-03 10:38:42 -03:00
parent f9dd5392ff
commit ca0d8d53a5

View file

@ -146,9 +146,17 @@ describe Vagrant::LXC::Driver::CLI do
end end
it 'supports a "namespaces" parameter' do it 'supports a "namespaces" parameter' do
subject.stub(:run).with(:attach, '-h').and_return('--namespaces')
subject.attach *(command + [{namespaces: ['network', 'mount']}]) subject.attach *(command + [{namespaces: ['network', 'mount']}])
subject.should have_received(:run).with(:attach, '--name', name, '--namespaces', 'NETWORK|MOUNT', '--', *command) subject.should have_received(:run).with(:attach, '--name', name, '--namespaces', 'NETWORK|MOUNT', '--', *command)
end end
it 'raises a NamespacesNotSupported error if not supported' do
subject.stub(:run).with(:attach, '-h').and_return('not supported')
expect {
subject.attach *(command + [{namespaces: ['network', 'mount']}])
}.to raise_error(Vagrant::LXC::Errors::NamespacesNotSupported)
end
end end
describe 'transition block' do describe 'transition block' do