Sha256: 83ec66ec5f37075516f1b2d09893c1af1e9c560adaa713f6e992a6dcc9f10acf

Contents?: true

Size: 694 Bytes

Versions: 39

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

include Serverspec::Helper::Debian

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.7.4 spec/debian/cron_spec.rb
serverspec-0.7.3 spec/debian/cron_spec.rb
serverspec-0.7.2 spec/debian/cron_spec.rb
serverspec-0.7.1 spec/debian/cron_spec.rb
serverspec-0.7.0 spec/debian/cron_spec.rb
serverspec-0.6.30 spec/debian/cron_spec.rb
serverspec-0.6.29 spec/debian/cron_spec.rb
serverspec-0.6.28 spec/debian/cron_spec.rb
serverspec-0.6.27 spec/debian/cron_spec.rb
serverspec-0.6.26 spec/debian/cron_spec.rb
serverspec-0.6.25 spec/debian/cron_spec.rb
serverspec-0.6.24 spec/debian/cron_spec.rb
serverspec-0.6.23 spec/debian/cron_spec.rb
serverspec-0.6.22 spec/debian/cron_spec.rb
serverspec-0.6.21 spec/debian/cron_spec.rb
serverspec-0.6.20 spec/debian/cron_spec.rb
serverspec-0.6.19 spec/debian/cron_spec.rb
serverspec-0.6.18 spec/debian/cron_spec.rb
serverspec-0.6.17 spec/debian/cron_spec.rb