spec/beaker/dsl/helpers/host_helpers_spec.rb in beaker-5.6.0 vs spec/beaker/dsl/helpers/host_helpers_spec.rb in beaker-5.7.0
- old
+ new
@@ -85,11 +85,11 @@
end
# This will only get hit if forking processes is supported and at least 2 items are being submitted to run in parallel
expect(InParallel::InParallelExecutor).to receive(:_execute_in_parallel).with(any_args).and_call_original.exactly(5).times
results = subject.on(hosts, command, { :run_in_parallel => true })
- expect(results).to be == expected
+ expect(results).to eq expected
end
it 'delegates to itself for each host passed' do
allow(subject).to receive(:hosts).and_return(hosts)
expected = []
@@ -97,34 +97,34 @@
expected << i
expect(host).to receive(:exec).and_return(i)
end
results = subject.on(hosts, command)
- expect(results).to be == expected
+ expect(results).to eq expected
end
context 'upon command completion' do
before do
allow(subject).to receive(:hosts).and_return(hosts)
expect(host).to receive(:exec).and_return(result)
@res = subject.on(host, command)
end
it 'returns the result of the action' do
- expect(@res).to be == result
+ expect(@res).to eq result
end
it 'provides access to stdout' do
- expect(@res.stdout).to be == 'stdout'
+ expect(@res.stdout).to eq 'stdout'
end
it 'provides access to stderr' do
- expect(@res.stderr).to be == 'stderr'
+ expect(@res.stderr).to eq 'stderr'
end
it 'provides access to exit_code' do
- expect(@res.exit_code).to be == 0
+ expect(@res.exit_code).to eq 0
end
end
context 'when passed a block with arity of 1' do
before do
@@ -139,23 +139,23 @@
end
end
it 'provides access to stdout' do
subject.on host, command do |containing_class|
- expect(containing_class.stdout).to be == 'stdout'
+ expect(containing_class.stdout).to eq 'stdout'
end
end
it 'provides access to stderr' do
subject.on host, command do |containing_class|
- expect(containing_class.stderr).to be == 'stderr'
+ expect(containing_class.stderr).to eq 'stderr'
end
end
it 'provides access to exit_code' do
subject.on host, command do |containing_class|
- expect(containing_class.exit_code).to be == 0
+ expect(containing_class.exit_code).to eq 0
end
end
end
context 'when passed a block with arity of 0' do
@@ -201,11 +201,11 @@
allow(subject).to receive(:on).and_return(result)
expect(subject).to receive(:on).exactly(retries + 2)
expect { subject.retry_on(host, command, opts) }.to raise_error(RuntimeError)
end
- it 'will return success correctly if it succeeds the first time' do
+ it 'returns success correctly if it succeeds the first time' do
result.stdout = 'stdout'
result.stderr = 'stderr'
result.exit_code = 0
opts = {
@@ -218,10 +218,10 @@
result_given = subject.retry_on(host, command, opts)
expect(result_given.exit_code).to be === 0
end
- it 'will return success correctly if it succeeds after failing a few times' do
+ it 'returns success correctly if it succeeds after failing a few times' do
result.stdout = 'stdout'
result.stderr = 'stderr'
opts = {
:max_retries => 10,