Sha256: 5745f9b1589ec04c4b2c808c3049274657f64f6e5b54787bf08c56f5f61bba68

Contents?: true

Size: 693 Bytes

Versions: 26

Compression:

Stored size: 693 Bytes

Contents

require 'spec_helper'

include SpecInfra::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

26 entries across 26 versions & 1 rubygems

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