spec/sprinkle/verify_spec.rb in sprinkle-0.7.6.2 vs spec/sprinkle/verify_spec.rb in sprinkle-0.7.7
- old
+ new
@@ -63,11 +63,11 @@
belongs_to_group "/etc/", "root"
belongs_to_group "/etc/", 0
end
end
@verification = @package.verifications[0]
- @delivery = double(Sprinkle::Deployment, :process => true, :sudo_command => "sudo")
+ @delivery = double(Sprinkle::Deployment, :process => true, :sudo_command => "sudo", :sudo? => false)
@verification.delivery = @delivery
end
describe "with sudo" do
before do
@@ -134,11 +134,11 @@
it 'should use id to check for user' do
@verification.commands.should include('id bob')
end
- it 'should use id to check for group' do
- @verification.commands.should include('id -g bobgroup')
+ it 'should use egrep to check a group exists' do
+ @verification.commands.should include('egrep -i "^bobgroup:" /etc/group')
end
it 'should do a "test -L" to check something is a symbolic link' do
@verification.commands.should include('test -L mypointer')
end