Sha256: 8a33d5b0c949f6ab8ba840a54a6c6c6438500e499a1304500e54844a5ff77051

Contents?: true

Size: 694 Bytes

Versions: 39

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::Gentoo

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

39 entries across 39 versions & 1 rubygems

Version Path
serverspec-0.11.5 spec/gentoo/cron_spec.rb
serverspec-0.11.4 spec/gentoo/cron_spec.rb
serverspec-0.11.3 spec/gentoo/cron_spec.rb
serverspec-0.11.2 spec/gentoo/cron_spec.rb
serverspec-0.9.4 spec/gentoo/cron_spec.rb
serverspec-0.9.3 spec/gentoo/cron_spec.rb
serverspec-0.9.2 spec/gentoo/cron_spec.rb
serverspec-0.9.1 spec/gentoo/cron_spec.rb
serverspec-0.9.0 spec/gentoo/cron_spec.rb
serverspec-0.8.1 spec/gentoo/cron_spec.rb
serverspec-0.8.0 spec/gentoo/cron_spec.rb
serverspec-0.7.13 spec/gentoo/cron_spec.rb
serverspec-0.7.12 spec/gentoo/cron_spec.rb
serverspec-0.7.11 spec/gentoo/cron_spec.rb
serverspec-0.7.10 spec/gentoo/cron_spec.rb
serverspec-0.7.9 spec/gentoo/cron_spec.rb
serverspec-0.7.8 spec/gentoo/cron_spec.rb
serverspec-0.7.7 spec/gentoo/cron_spec.rb
serverspec-0.7.6 spec/gentoo/cron_spec.rb
serverspec-0.7.5 spec/gentoo/cron_spec.rb