From ca0d8d53a5e65a79c80c87d1bd25a070d12e062a Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Thu, 3 Oct 2013 10:38:42 -0300 Subject: [PATCH] Fix broken specs --- spec/unit/driver/cli_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/unit/driver/cli_spec.rb b/spec/unit/driver/cli_spec.rb index 5ff5b0f..54e848b 100644 --- a/spec/unit/driver/cli_spec.rb +++ b/spec/unit/driver/cli_spec.rb @@ -146,9 +146,17 @@ describe Vagrant::LXC::Driver::CLI do end it 'supports a "namespaces" parameter' do + subject.stub(:run).with(:attach, '-h').and_return('--namespaces') subject.attach *(command + [{namespaces: ['network', 'mount']}]) subject.should have_received(:run).with(:attach, '--name', name, '--namespaces', 'NETWORK|MOUNT', '--', *command) 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 describe 'transition block' do