Sha256: c44ec120f4e1d9285953df01737df64e477dccc7c585ff0c453e9a2b6114a95e

Contents?: true

Size: 723 Bytes

Versions: 16

Compression:

Stored size: 723 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Plamo

describe cron do
  it { should have_entry '* * * * * /usr/local/bin/batch.sh' }
  its(:command) { should eq 'crontab -l | grep -v "#" -- | 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 -v "#" | 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

16 entries across 16 versions & 1 rubygems

Version Path
serverspec-1.16.0 spec/plamo/cron_spec.rb
serverspec-1.15.0 spec/plamo/cron_spec.rb
serverspec-1.14.0 spec/plamo/cron_spec.rb
serverspec-1.13.0 spec/plamo/cron_spec.rb
serverspec-1.12.0 spec/plamo/cron_spec.rb
serverspec-1.11.0 spec/plamo/cron_spec.rb
serverspec-1.10.0 spec/plamo/cron_spec.rb
serverspec-1.9.1 spec/plamo/cron_spec.rb
serverspec-1.9.0 spec/plamo/cron_spec.rb
serverspec-1.8.0 spec/plamo/cron_spec.rb
serverspec-1.7.1 spec/plamo/cron_spec.rb
serverspec-1.7.0 spec/plamo/cron_spec.rb
serverspec-1.6.0 spec/plamo/cron_spec.rb
serverspec-1.5.0 spec/plamo/cron_spec.rb
serverspec-1.4.2 spec/plamo/cron_spec.rb
serverspec-1.4.1 spec/plamo/cron_spec.rb