Sha256: f1d5b74a0416dc89d42a0bfc06463dd7149229e73898d2b51ebae08b6081e875

Contents?: true

Size: 691 Bytes

Versions: 42

Compression:

Stored size: 691 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Solaris

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 -l root | 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

42 entries across 42 versions & 1 rubygems

Version Path
serverspec-1.0.0 spec/solaris/cron_spec.rb
serverspec-0.16.0 spec/solaris/cron_spec.rb
serverspec-0.15.5 spec/solaris/cron_spec.rb
serverspec-0.15.4 spec/solaris/cron_spec.rb
serverspec-0.15.3 spec/solaris/cron_spec.rb
serverspec-0.15.2 spec/solaris/cron_spec.rb
serverspec-0.15.1 spec/solaris/cron_spec.rb
serverspec-0.15.0 spec/solaris/cron_spec.rb
serverspec-0.14.4 spec/solaris/cron_spec.rb
serverspec-0.14.3 spec/solaris/cron_spec.rb
serverspec-0.14.2 spec/solaris/cron_spec.rb
serverspec-0.14.1 spec/solaris/cron_spec.rb
serverspec-0.14.0 spec/solaris/cron_spec.rb
serverspec-0.13.7 spec/solaris/cron_spec.rb
serverspec-0.13.6 spec/solaris/cron_spec.rb
serverspec-0.13.5 spec/solaris/cron_spec.rb
serverspec-0.13.4 spec/solaris/cron_spec.rb
serverspec-0.13.3 spec/solaris/cron_spec.rb
serverspec-0.13.2 spec/solaris/cron_spec.rb
serverspec-0.13.1 spec/solaris/cron_spec.rb