spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta31 vs spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta32
- old
+ new
@@ -97,10 +97,13 @@
should eq({:family => 'ubuntu', :release => '12.04', :arch => 'x86_64' })
end
end
context 'test ubuntu with /etc/lsb-release' do
+ before do
+ property[:os] = nil
+ end
subject { os }
it do
expect(Specinfra.backend).to receive(:run_command).at_least(1).times do |args|
if ['ls /etc/debian_version', 'cat /etc/lsb-release'].include? args
double(
@@ -122,9 +125,12 @@
should eq({:family => 'ubuntu', :release => '12.04', :arch => 'x86_64' })
end
end
context 'test debian (no lsb_release or lsb-release)' do
+ before do
+ property[:os] = nil
+ end
subject { os }
it do
expect(Specinfra.backend).to receive(:run_command).at_least(1).times do |args|
if args == 'ls /etc/debian_version'
double :run_command_response, :success? => true, :stdout => nil