Sha256: 5c268d84137f3a02ee9bf73cc39c8a5b681b272f32642fc8b932a374206e3b96

Contents?: true

Size: 694 Bytes

Versions: 26

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::FreeBSD

describe cron do
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
  its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
end

describe cron do
  it { should_not have_entry 'invalid entry' }
end

describe cron do
  it { should have_entry('* * * * * /usr/local/bin/batch.sh').with_user('root') }
  its(:command) { should eq 'crontab -u root -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' }
end

describe cron do
  it { should_not have_entry('* * * * * /usr/local/bin/batch.sh').with_user('invalid-user') }
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
serverspec-0.13.4 spec/freebsd/cron_spec.rb
serverspec-0.13.3 spec/freebsd/cron_spec.rb
serverspec-0.13.2 spec/freebsd/cron_spec.rb
serverspec-0.13.1 spec/freebsd/cron_spec.rb
serverspec-0.13.0 spec/freebsd/cron_spec.rb
serverspec-0.12.0 spec/freebsd/cron_spec.rb