Skip to content

Commit

Permalink
CI: Fixed #to_be_successfully_executed and #to_have_exit_status
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrasimplicity authored and mvz committed May 30, 2019
1 parent 04b5cca commit 0d47681
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/aruba/matchers/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ def announcer(*args)
end

describe '#to_have_exit_status' do
let(:cmd) { 'true' }
let(:cmd) { 'exit 0' }

before(:each) { run_command(cmd) }

context 'when has exit 0' do
it { expect(last_command_started).to have_exit_status 0 }
end

context 'when has exit 0' do
let(:cmd) { 'false' }
context 'when does not have exit 0' do
let(:cmd) { 'exit 1' }
it { expect(last_command_started).not_to have_exit_status 0 }
end
end

describe '#to_be_successfully_executed_' do
let(:cmd) { 'true' }
let(:cmd) { 'exit 0' }

before(:each) { run_command(cmd) }

context 'when has exit 0' do
it { expect(last_command_started).to be_successfully_executed }
end

context 'when has exit 0' do
let(:cmd) { 'false' }
context 'when does not have exit 0' do
let(:cmd) { 'exit 1' }
it { expect(last_command_started).not_to be_successfully_executed }
end
end
Expand Down

0 comments on commit 0d47681

Please sign in to comment.