Sha256: c2082e72c0531ba0f339f6c84b438fa4fdda4459191788014318446bd53f11dd

Contents?: true

Size: 705 Bytes

Versions: 20

Compression:

Stored size: 705 Bytes

Contents

require 'spec_helper'

RSpec.configure do |c|
  c.os = 'FreeBSD'
end

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

20 entries across 20 versions & 1 rubygems

Version Path
serverspec-0.11.1 spec/freebsd/cron_spec.rb
serverspec-0.11.0 spec/freebsd/cron_spec.rb
serverspec-0.10.13 spec/freebsd/cron_spec.rb
serverspec-0.10.12 spec/freebsd/cron_spec.rb
serverspec-0.10.11 spec/freebsd/cron_spec.rb
serverspec-0.10.10 spec/freebsd/cron_spec.rb
serverspec-0.10.9 spec/freebsd/cron_spec.rb
serverspec-0.10.8 spec/freebsd/cron_spec.rb
serverspec-0.10.7 spec/freebsd/cron_spec.rb
serverspec-0.10.6 spec/freebsd/cron_spec.rb
serverspec-0.10.5 spec/freebsd/cron_spec.rb
serverspec-0.10.4 spec/freebsd/cron_spec.rb
serverspec-0.10.3 spec/freebsd/cron_spec.rb
serverspec-0.10.2 spec/freebsd/cron_spec.rb
serverspec-0.10.1 spec/freebsd/cron_spec.rb
serverspec-0.10.0 spec/freebsd/cron_spec.rb
serverspec-0.9.8 spec/freebsd/cron_spec.rb
serverspec-0.9.7 spec/freebsd/cron_spec.rb
serverspec-0.9.6 spec/freebsd/cron_spec.rb
serverspec-0.9.5 spec/freebsd/cron_spec.rb