spec/darwin/cron_spec.rb in serverspec-1.4.0 vs spec/darwin/cron_spec.rb in serverspec-1.4.1

- old
+ new

@@ -2,19 +2,19 @@ include SpecInfra::Helper::Darwin describe cron do it { should have_entry '* * * * * /usr/local/bin/batch.sh' } - its(:command) { should eq 'crontab -l | grep -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /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 -- \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ \\\\\\*\\ /usr/local/bin/batch.sh' } + 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