spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta5 vs spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta6
- old
+ new
@@ -76,11 +76,11 @@
describe 'check_os' do
context 'test ubuntu with lsb_release command' do
subject { backend.check_os }
it do
- backend.should_receive(:run_command).at_least(1).times do |args|
+ expect(backend).to receive(:run_command).at_least(1).times do |args|
if ['ls /etc/debian_version', 'lsb_release -ir'].include? args
double(
:run_command_response,
:success? => true,
:stdout => "Distributor ID:\tUbuntu\nRelease:\t12.04\n"
@@ -96,11 +96,11 @@
end
context 'test ubuntu with /etc/lsb-release' do
subject { backend.check_os }
it do
- backend.should_receive(:run_command).at_least(1).times do |args|
+ expect(backend).to receive(:run_command).at_least(1).times do |args|
if ['ls /etc/debian_version', 'cat /etc/lsb-release'].include? args
double(
:run_command_response,
:success? => true,
:stdout => <<-EOF
@@ -121,10 +121,10 @@
end
context 'test debian (no lsb_release or lsb-release)' do
subject { backend.check_os }
it do
- backend.should_receive(:run_command).at_least(1).times do |args|
+ expect(backend).to receive(:run_command).at_least(1).times do |args|
if args == 'ls /etc/debian_version'
double :run_command_response, :success? => true
elsif args == 'uname -m'
double :run_command_response, :success? => true, :stdout => "x86_64\n"
else