Sha256: 3904f73092f072d484601964053da1a9236d03a047cb10fd7d534e5dda648342
Contents?: true
Size: 724 Bytes
Versions: 16
Compression:
Stored size: 724 Bytes
Contents
require 'spec_helper' include SpecInfra::Helper::RedHat 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