diff --git a/.rspec b/.rspec index 51fd40ee..b8f626ef 100644 --- a/.rspec +++ b/.rspec @@ -1 +1 @@ --c --order rand -t ~ssh +-c --order rand diff --git a/spec/lib/mina/commands_spec.rb b/spec/lib/mina/commands_spec.rb index c16f3b5a..1a481056 100644 --- a/spec/lib/mina/commands_spec.rb +++ b/spec/lib/mina/commands_spec.rb @@ -82,7 +82,7 @@ end describe '#run' do - it 'calls run on a backend' do + it 'calls run on a backend', :suppressed_output do commands.command('ls -al') runner = double(:runner) allow(Mina::Runner).to receive(:new).and_return(runner) diff --git a/spec/lib/mina/configuration_spec.rb b/spec/lib/mina/configuration_spec.rb index 71a23e2a..9672954c 100644 --- a/spec/lib/mina/configuration_spec.rb +++ b/spec/lib/mina/configuration_spec.rb @@ -47,6 +47,7 @@ it 'raises an error if key is not set' do expect { config.ensure!(:key) }.to raise_error(SystemExit) + .and output(/key must be defined!/).to_stdout end end diff --git a/spec/tasks/default_spec.rb b/spec/tasks/default_spec.rb index c90dd996..80818aa9 100644 --- a/spec/tasks/default_spec.rb +++ b/spec/tasks/default_spec.rb @@ -16,6 +16,7 @@ it 'exits if no command given' do expect { subject.invoke }.to raise_error(SystemExit) + .and output(/You need to provide a command/).to_stdout end end diff --git a/spec/tasks/init_spec.rb b/spec/tasks/init_spec.rb index 1e0b6608..737e97c5 100644 --- a/spec/tasks/init_spec.rb +++ b/spec/tasks/init_spec.rb @@ -11,6 +11,6 @@ it 'doesnt create deploy rb if already exists' do allow(File).to receive(:exist?).and_return(false) - expect { subject.invoke }.to raise_error(SystemExit) + expect { subject.invoke }.to raise_error(SystemExit).and output(/You already have/).to_stdout end end