Sha256: 028716cf69e9fd3f3d1494fd93d6d95420bbe2e6d74a8dd40424fead392b8ece
Contents?: true
Size: 1.11 KB
Versions: 49
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe 'whenever' do before do mock_config { use_recipe :whenever} end describe 'whenever_identifier' do before do mock_config { set :application, 'foo' } end it 'defaults to application' do config.whenever_identifier.should == 'foo' end it 'default to application with stage when using multistage' do mock_config do use_recipe :multistage set :current_stage, 'bar' end config.whenever_identifier.should == 'foo_bar' end end describe 'whenever_cmd' do it 'has default value' do config.whenever_cmd.should == 'whenever' end it 'respects bundle recipe' do mock_config { use_recipe :bundle } config.whenever_cmd.should == 'bundle exec whenever' end end describe 'whenever:update_crontab' do it 'runs command' do mock_config do set :deploy_to, '/foo/bar' set :whenever_cmd, 'wc' set :whenever_identifier, 'wi' end cli_execute 'whenever:update_crontab' config.should have_run('cd /foo/bar && wc --update-crontab wi') end end end
Version data entries
49 entries across 49 versions & 2 rubygems