whenever 0.8.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.travis.yml +20 -7
  4. data/Appraisals +19 -0
  5. data/CHANGELOG.md +116 -3
  6. data/Gemfile +3 -3
  7. data/LICENSE +2 -2
  8. data/README.md +133 -32
  9. data/Rakefile +3 -10
  10. data/bin/whenever +3 -0
  11. data/bin/wheneverize +8 -5
  12. data/gemfiles/activesupport4.1.gemfile +7 -0
  13. data/gemfiles/activesupport4.2.gemfile +7 -0
  14. data/gemfiles/activesupport5.0.gemfile +7 -0
  15. data/gemfiles/activesupport5.1.gemfile +7 -0
  16. data/gemfiles/activesupport5.2.gemfile +7 -0
  17. data/lib/whenever/capistrano/v2/hooks.rb +8 -0
  18. data/lib/whenever/capistrano/{recipes.rb → v2/recipes.rb} +7 -13
  19. data/lib/whenever/capistrano/{support.rb → v2/support.rb} +12 -0
  20. data/lib/whenever/capistrano/v3/tasks/whenever.rake +56 -0
  21. data/lib/whenever/capistrano.rb +5 -6
  22. data/lib/whenever/command_line.rb +69 -48
  23. data/lib/whenever/cron.rb +54 -25
  24. data/lib/whenever/job.rb +13 -14
  25. data/lib/whenever/job_list.rb +54 -24
  26. data/lib/whenever/numeric.rb +13 -0
  27. data/lib/whenever/numeric_seconds.rb +48 -0
  28. data/lib/whenever/os.rb +7 -0
  29. data/lib/whenever/output_redirection.rb +1 -0
  30. data/lib/whenever/setup.rb +19 -15
  31. data/lib/whenever/version.rb +2 -2
  32. data/lib/whenever.rb +19 -14
  33. data/test/functional/command_line_test.rb +379 -243
  34. data/test/functional/output_at_test.rb +227 -249
  35. data/test/functional/output_default_defined_jobs_test.rb +251 -193
  36. data/test/functional/output_defined_job_test.rb +65 -91
  37. data/test/functional/output_env_test.rb +22 -26
  38. data/test/functional/output_jobs_for_roles_test.rb +46 -65
  39. data/test/functional/output_jobs_with_mailto_test.rb +168 -0
  40. data/test/functional/output_redirection_test.rb +232 -291
  41. data/test/test_case.rb +32 -0
  42. data/test/test_helper.rb +44 -15
  43. data/test/unit/capistrano_support_test.rb +128 -134
  44. data/test/unit/cron_test.rb +373 -208
  45. data/test/unit/executable_test.rb +142 -0
  46. data/test/unit/job_test.rb +111 -117
  47. data/whenever.gemspec +7 -4
  48. metadata +63 -44
@@ -1,238 +1,296 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
1
+ require 'test_helper'
2
2
 
3
- class OutputDefaultDefinedJobsTest < Test::Unit::TestCase
3
+ class OutputDefaultDefinedJobsTest < Whenever::TestCase
4
4
 
5
5
  # command
6
6
 
7
- context "A plain command with the job template set to nil" do
8
- setup do
9
- @output = Whenever.cron \
10
- <<-file
11
- set :job_template, nil
12
- every 2.hours do
13
- command "blahblah"
14
- end
15
- file
16
- end
7
+ test "A plain command with the job template set to nil" do
8
+ output = Whenever.cron \
9
+ <<-file
10
+ set :job_template, nil
11
+ every 2.hours do
12
+ command "blahblah"
13
+ end
14
+ file
17
15
 
18
- should "output the command" do
19
- assert_match /^.+ .+ .+ .+ blahblah$/, @output
20
- end
16
+ assert_match(/^.+ .+ .+ .+ blahblah$/, output)
21
17
  end
22
18
 
23
- context "A plain command with no job template set" do
24
- setup do
25
- @output = Whenever.cron \
26
- <<-file
27
- every 2.hours do
28
- command "blahblah"
29
- end
30
- file
31
- end
19
+ test "A plain command with no job template set" do
20
+ output = Whenever.cron \
21
+ <<-file
22
+ every 2.hours do
23
+ command "blahblah"
24
+ end
25
+ file
32
26
 
33
- should "output the command with the default job template" do
34
- assert_match /^.+ .+ .+ .+ \/bin\/bash -l -c 'blahblah'$/, @output
35
- end
27
+ assert_match(/^.+ .+ .+ .+ \/bin\/bash -l -c 'blahblah'$/, output)
36
28
  end
37
29
 
38
- context "A plain command that overrides the job_template set" do
39
- setup do
40
- @output = Whenever.cron \
41
- <<-file
42
- set :job_template, "/bin/bash -l -c ':job'"
43
- every 2.hours do
44
- command "blahblah", :job_template => "/bin/sh -l -c ':job'"
45
- end
46
- file
47
- end
48
-
49
- should "output the command using that job_template" do
50
- assert_match /^.+ .+ .+ .+ \/bin\/sh -l -c 'blahblah'$/, @output
51
- assert_no_match /bash/, @output
52
- end
53
- end
54
-
55
- context "A plain command that is conditional on default environent and path" do
56
- setup do
57
- Whenever.expects(:path).at_least_once.returns('/what/you/want')
58
- @output = Whenever.cron \
59
- <<-file
60
- set :job_template, nil
61
- if environment == 'production' && path == '/what/you/want'
62
- every 2.hours do
63
- command "blahblah"
64
- end
65
- end
66
- file
67
- end
68
-
69
- should "output the command" do
70
- assert_match /blahblah/, @output
71
- end
30
+ test "A plain command with a job_template using a normal parameter" do
31
+ output = Whenever.cron \
32
+ <<-file
33
+ set :job_template, "/bin/bash -l -c 'cd :path && :job'"
34
+ every 2.hours do
35
+ set :path, "/tmp"
36
+ command "blahblah"
37
+ end
38
+ file
39
+
40
+ assert_match(/^.+ .+ .+ .+ \/bin\/bash -l -c 'cd \/tmp \&\& blahblah'$/, output)
72
41
  end
73
42
 
74
- # runner
43
+ test "A plain command that overrides the job_template set" do
44
+ output = Whenever.cron \
45
+ <<-file
46
+ set :job_template, "/bin/bash -l -c ':job'"
47
+ every 2.hours do
48
+ command "blahblah", :job_template => "/bin/sh -l -c ':job'"
49
+ end
50
+ file
75
51
 
76
- context "A runner with path set" do
77
- setup do
78
- @output = Whenever.cron \
79
- <<-file
80
- set :job_template, nil
81
- set :path, '/my/path'
82
- every 2.hours do
83
- runner 'blahblah'
84
- end
85
- file
86
- end
87
52
 
88
- should "output the runner using that path" do
89
- assert_match two_hours + %( cd /my/path && script/runner -e production 'blahblah'), @output
90
- end
53
+ assert_match(/^.+ .+ .+ .+ \/bin\/sh -l -c 'blahblah'$/, output)
54
+ assert_no_match(/bash/, output)
91
55
  end
92
56
 
93
- context "A runner that overrides the path set" do
94
- setup do
95
- @output = Whenever.cron \
96
- <<-file
97
- set :job_template, nil
98
- set :path, '/my/path'
99
- every 2.hours do
100
- runner "blahblah", :path => '/some/other/path'
101
- end
102
- file
103
- end
57
+ test "A plain command that overrides the job_template set using a parameter" do
58
+ output = Whenever.cron \
59
+ <<-file
60
+ set :job_template, "/bin/bash -l -c 'cd :path && :job'"
61
+ every 2.hours do
62
+ set :path, "/tmp"
63
+ command "blahblah", :job_template => "/bin/sh -l -c 'cd :path && :job'"
64
+ end
65
+ file
104
66
 
105
- should "output the runner using that path" do
106
- assert_match two_hours + %( cd /some/other/path && script/runner -e production 'blahblah'), @output
107
- end
67
+
68
+ assert_match(/^.+ .+ .+ .+ \/bin\/sh -l -c 'cd \/tmp && blahblah'$/, output)
69
+ assert_no_match(/bash/, output)
108
70
  end
109
71
 
110
- context "A runner for a Rails 3 app" do
111
- setup do
112
- Whenever.expects(:path).at_least_once.returns('/my/path')
113
- Whenever.expects(:rails3?).returns(true)
114
- @output = Whenever.cron \
115
- <<-file
116
- set :job_template, nil
72
+ test "A plain command that is conditional on default environent and path" do
73
+ Whenever.expects(:path).at_least_once.returns('/what/you/want')
74
+ output = Whenever.cron \
75
+ <<-file
76
+ set :job_template, nil
77
+ if environment == 'production' && path == '/what/you/want'
117
78
  every 2.hours do
118
- runner 'blahblah'
79
+ command "blahblah"
119
80
  end
120
- file
121
- end
81
+ end
82
+ file
122
83
 
123
- should "use the Rails 3 runner job by default" do
124
- assert_match two_hours + %( cd /my/path && script/rails runner -e production 'blahblah'), @output
125
- end
84
+ assert_match(/blahblah/, output)
126
85
  end
127
86
 
128
- # rake
87
+ # runner
129
88
 
130
- context "A rake command with path set" do
131
- setup do
132
- @output = Whenever.cron \
133
- <<-file
134
- set :job_template, nil
135
- set :path, '/my/path'
136
- every 2.hours do
137
- rake "blahblah"
138
- end
139
- file
140
- end
89
+ test "A runner with path set" do
90
+ output = Whenever.cron \
91
+ <<-file
92
+ set :job_template, nil
93
+ set :path, '/my/path'
94
+ every 2.hours do
95
+ runner 'blahblah'
96
+ end
97
+ file
98
+
99
+ assert_match two_hours + %( cd /my/path && bundle exec script/runner -e production 'blahblah'), output
100
+ end
141
101
 
142
- should "output the rake command using that path" do
143
- assert_match two_hours + ' cd /my/path && RAILS_ENV=production bundle exec rake blahblah --silent', @output
144
- end
102
+ test "A runner that overrides the path set" do
103
+ output = Whenever.cron \
104
+ <<-file
105
+ set :job_template, nil
106
+ set :path, '/my/path'
107
+ every 2.hours do
108
+ runner "blahblah", :path => '/some/other/path'
109
+ end
110
+ file
111
+
112
+ assert_match two_hours + %( cd /some/other/path && bundle exec script/runner -e production 'blahblah'), output
145
113
  end
146
114
 
147
- context "A rake for a non-bundler app" do
148
- setup do
149
- Whenever.expects(:path).at_least_once.returns('/my/path')
150
- Whenever.expects(:bundler?).returns(false)
151
- @output = Whenever.cron \
152
- <<-file
153
- set :job_template, nil
154
- every 2.hours do
155
- rake 'blahblah'
156
- end
157
- file
158
- end
115
+ test "A runner for a non-bundler app" do
116
+ Whenever.expects(:bundler?).returns(false)
117
+ output = Whenever.cron \
118
+ <<-file
119
+ set :job_template, nil
120
+ set :path, '/my/path'
121
+ every 2.hours do
122
+ runner 'blahblah'
123
+ end
124
+ file
125
+
126
+ assert_match two_hours + %( cd /my/path && script/runner -e production 'blahblah'), output
127
+ end
159
128
 
160
- should "not use invoke through bundler" do
161
- assert_match two_hours + ' cd /my/path && RAILS_ENV=production rake blahblah --silent', @output
162
- end
129
+ test "A runner for an app with bin/rails" do
130
+ Whenever.expects(:path).at_least_once.returns('/my/path')
131
+ Whenever.expects(:bin_rails?).returns(true)
132
+ output = Whenever.cron \
133
+ <<-file
134
+ set :job_template, nil
135
+ every 2.hours do
136
+ runner 'blahblah'
137
+ end
138
+ file
139
+
140
+ assert_match two_hours + %( cd /my/path && bin/rails runner -e production 'blahblah'), output
163
141
  end
164
142
 
165
- context "A rake command that overrides the path set" do
166
- setup do
167
- @output = Whenever.cron \
168
- <<-file
169
- set :job_template, nil
170
- set :path, '/my/path'
171
- every 2.hours do
172
- rake "blahblah", :path => '/some/other/path'
173
- end
174
- file
175
- end
143
+ test "A runner for an app with script/rails" do
144
+ Whenever.expects(:path).at_least_once.returns('/my/path')
145
+ Whenever.expects(:script_rails?).returns(true)
146
+ output = Whenever.cron \
147
+ <<-file
148
+ set :job_template, nil
149
+ every 2.hours do
150
+ runner 'blahblah'
151
+ end
152
+ file
153
+
154
+ assert_match two_hours + %( cd /my/path && script/rails runner -e production 'blahblah'), output
155
+ end
176
156
 
177
- should "output the rake command using that path" do
178
- assert_match two_hours + ' cd /some/other/path && RAILS_ENV=production bundle exec rake blahblah --silent', @output
179
- end
157
+ # rake
158
+
159
+ test "A rake command with path set" do
160
+ output = Whenever.cron \
161
+ <<-file
162
+ set :job_template, nil
163
+ set :path, '/my/path'
164
+ every 2.hours do
165
+ rake "blahblah"
166
+ end
167
+ file
168
+
169
+ assert_match two_hours + ' cd /my/path && RAILS_ENV=production bundle exec rake blahblah --silent', output
180
170
  end
181
171
 
172
+ test "A rake command with arguments" do
173
+ output = Whenever.cron \
174
+ <<-file
175
+ set :job_template, nil
176
+ set :path, '/my/path'
177
+ every 2.hours do
178
+ rake "blahblah[foobar]"
179
+ end
180
+ file
181
+
182
+ assert_match two_hours + ' cd /my/path && RAILS_ENV=production bundle exec rake blahblah[foobar] --silent', output
183
+ end
182
184
 
183
- # script
185
+ test "A rake for a non-bundler app" do
186
+ Whenever.expects(:path).at_least_once.returns('/my/path')
187
+ Whenever.expects(:bundler?).returns(false)
188
+ output = Whenever.cron \
189
+ <<-file
190
+ set :job_template, nil
191
+ every 2.hours do
192
+ rake 'blahblah'
193
+ end
194
+ file
195
+
196
+ assert_match two_hours + ' cd /my/path && RAILS_ENV=production rake blahblah --silent', output
197
+ end
184
198
 
185
- context "A script command with path set" do
186
- setup do
187
- @output = Whenever.cron \
188
- <<-file
189
- set :job_template, nil
190
- set :path, '/my/path'
191
- every 2.hours do
192
- script "blahblah"
193
- end
194
- file
195
- end
199
+ test "A rake command that overrides the path set" do
200
+ output = Whenever.cron \
201
+ <<-file
202
+ set :job_template, nil
203
+ set :path, '/my/path'
204
+ every 2.hours do
205
+ rake "blahblah", :path => '/some/other/path'
206
+ end
207
+ file
208
+
209
+ assert_match two_hours + ' cd /some/other/path && RAILS_ENV=production bundle exec rake blahblah --silent', output
210
+ end
196
211
 
197
- should "output the script command using that path" do
198
- assert_match two_hours + ' cd /my/path && RAILS_ENV=production bundle exec script/blahblah', @output
199
- end
212
+ test "A rake command that sets the environment variable" do
213
+ output = Whenever.cron \
214
+ <<-file
215
+ set :job_template, nil
216
+ set :path, '/my/path'
217
+ set :environment_variable, 'RAKE_ENV'
218
+ every 2.hours do
219
+ rake "blahblah"
220
+ end
221
+ file
222
+
223
+ assert_match two_hours + ' cd /my/path && RAKE_ENV=production bundle exec rake blahblah --silent', output
200
224
  end
201
225
 
202
- context "A script command for a non-bundler app" do
203
- setup do
204
- Whenever.expects(:path).at_least_once.returns('/my/path')
205
- Whenever.expects(:bundler?).returns(false)
206
- @output = Whenever.cron \
207
- <<-file
208
- set :job_template, nil
209
- every 2.hours do
210
- script 'blahblah'
211
- end
212
- file
213
- end
226
+ test "A rake command that overrides the environment variable" do
227
+ output = Whenever.cron \
228
+ <<-file
229
+ set :job_template, nil
230
+ set :path, '/my/path'
231
+ set :environment_variable, 'RAKE_ENV'
232
+ every 2.hours do
233
+ rake "blahblah", :environment_variable => 'SOME_ENV'
234
+ end
235
+ file
236
+
237
+ assert_match two_hours + ' cd /my/path && SOME_ENV=production bundle exec rake blahblah --silent', output
238
+ end
214
239
 
215
- should "not use invoke through bundler" do
216
- assert_match two_hours + ' cd /my/path && RAILS_ENV=production script/blahblah', @output
217
- end
240
+ # script
241
+
242
+ test "A script command with path set" do
243
+ output = Whenever.cron \
244
+ <<-file
245
+ set :job_template, nil
246
+ set :path, '/my/path'
247
+ every 2.hours do
248
+ script "blahblah"
249
+ end
250
+ file
251
+
252
+ assert_match two_hours + ' cd /my/path && RAILS_ENV=production bundle exec script/blahblah', output
218
253
  end
219
254
 
220
- context "A script command that uses output" do
221
- setup do
222
- @output = Whenever.cron \
223
- <<-file
224
- set :job_template, nil
225
- set :output, '/log/file'
226
- set :path, '/my/path'
227
- every 2.hours do
228
- script "blahblah", :path => '/some/other/path'
229
- end
230
- file
231
- end
255
+ test "A script command for a non-bundler app" do
256
+ Whenever.expects(:path).at_least_once.returns('/my/path')
257
+ Whenever.expects(:bundler?).returns(false)
258
+ output = Whenever.cron \
259
+ <<-file
260
+ set :job_template, nil
261
+ every 2.hours do
262
+ script 'blahblah'
263
+ end
264
+ file
265
+
266
+ assert_match two_hours + ' cd /my/path && RAILS_ENV=production script/blahblah', output
267
+ end
232
268
 
233
- should "output the script command using that path" do
234
- assert_match two_hours + ' cd /some/other/path && RAILS_ENV=production bundle exec script/blahblah >> /log/file 2>&1', @output
235
- end
269
+ test "A script command that uses output" do
270
+ output = Whenever.cron \
271
+ <<-file
272
+ set :job_template, nil
273
+ set :output, '/log/file'
274
+ set :path, '/my/path'
275
+ every 2.hours do
276
+ script "blahblah", :path => '/some/other/path'
277
+ end
278
+ file
279
+
280
+ assert_match two_hours + ' cd /some/other/path && RAILS_ENV=production bundle exec script/blahblah >> /log/file 2>&1', output
236
281
  end
237
282
 
238
- end
283
+ test "A script command that uses an environment variable" do
284
+ output = Whenever.cron \
285
+ <<-file
286
+ set :job_template, nil
287
+ set :environment_variable, 'RAKE_ENV'
288
+ set :path, '/my/path'
289
+ every 2.hours do
290
+ script "blahblah"
291
+ end
292
+ file
293
+
294
+ assert_match two_hours + ' cd /my/path && RAKE_ENV=production bundle exec script/blahblah', output
295
+ end
296
+ end
@@ -1,111 +1,85 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../test_helper")
1
+ require 'test_helper'
2
2
 
3
- class OutputDefinedJobTest < Test::Unit::TestCase
3
+ class OutputDefinedJobTest < Whenever::TestCase
4
+ test "defined job with a :task" do
5
+ output = Whenever.cron \
6
+ <<-file
7
+ set :job_template, nil
8
+ job_type :some_job, "before :task after"
9
+ every 2.hours do
10
+ some_job "during"
11
+ end
12
+ file
4
13
 
5
- context "A defined job with a :task" do
6
- setup do
7
- @output = Whenever.cron \
8
- <<-file
9
- set :job_template, nil
10
- job_type :some_job, "before :task after"
11
- every 2.hours do
12
- some_job "during"
13
- end
14
- file
15
- end
16
-
17
- should "output the defined job with the task" do
18
- assert_match /^.+ .+ .+ .+ before during after$/, @output
19
- end
14
+ assert_match(/^.+ .+ .+ .+ before during after$/, output)
20
15
  end
21
16
 
22
- context "A defined job with a :task and some options" do
23
- setup do
24
- @output = Whenever.cron \
25
- <<-file
26
- set :job_template, nil
27
- job_type :some_job, "before :task after :option1 :option2"
28
- every 2.hours do
29
- some_job "during", :option1 => 'happy', :option2 => 'birthday'
30
- end
31
- file
32
- end
17
+ test "defined job with a :task and some options" do
18
+ output = Whenever.cron \
19
+ <<-file
20
+ set :job_template, nil
21
+ job_type :some_job, "before :task after :option1 :option2"
22
+ every 2.hours do
23
+ some_job "during", :option1 => 'happy', :option2 => 'birthday'
24
+ end
25
+ file
33
26
 
34
- should "output the defined job with the task and options" do
35
- assert_match /^.+ .+ .+ .+ before during after happy birthday$/, @output
36
- end
27
+ assert_match(/^.+ .+ .+ .+ before during after happy birthday$/, output)
37
28
  end
38
29
 
39
- context "A defined job with a :task and an option where the option is set globally" do
40
- setup do
41
- @output = Whenever.cron \
42
- <<-file
43
- set :job_template, nil
44
- job_type :some_job, "before :task after :option1"
45
- set :option1, 'happy'
46
- every 2.hours do
47
- some_job "during"
48
- end
49
- file
50
- end
30
+ test "defined job with a :task and an option where the option is set globally" do
31
+ output = Whenever.cron \
32
+ <<-file
33
+ set :job_template, nil
34
+ job_type :some_job, "before :task after :option1"
35
+ set :option1, 'happy'
36
+ every 2.hours do
37
+ some_job "during"
38
+ end
39
+ file
51
40
 
52
- should "output the defined job with the task and options" do
53
- assert_match /^.+ .+ .+ .+ before during after happy$/, @output
54
- end
41
+ assert_match(/^.+ .+ .+ .+ before during after happy$/, output)
55
42
  end
56
43
 
57
- context "A defined job with a :task and an option where the option is set globally and locally" do
58
- setup do
59
- @output = Whenever.cron \
60
- <<-file
61
- set :job_template, nil
62
- job_type :some_job, "before :task after :option1"
63
- set :option1, 'global'
64
- every 2.hours do
65
- some_job "during", :option1 => 'local'
66
- end
67
- file
68
- end
44
+ test "defined job with a :task and an option where the option is set globally and locally" do
45
+ output = Whenever.cron \
46
+ <<-file
47
+ set :job_template, nil
48
+ job_type :some_job, "before :task after :option1"
49
+ set :option1, 'global'
50
+ every 2.hours do
51
+ some_job "during", :option1 => 'local'
52
+ end
53
+ file
69
54
 
70
- should "output the defined job using the local option" do
71
- assert_match /^.+ .+ .+ .+ before during after local$/, @output
72
- end
55
+ assert_match(/^.+ .+ .+ .+ before during after local$/, output)
73
56
  end
74
57
 
75
- context "A defined job with a :task and an option that is not set" do
76
- setup do
77
- @output = Whenever.cron \
78
- <<-file
79
- set :job_template, nil
80
- job_type :some_job, "before :task after :option1"
81
- every 2.hours do
82
- some_job "during", :option2 => 'happy'
83
- end
84
- file
85
- end
58
+ test "defined job with a :task and an option that is not set" do
59
+ output = Whenever.cron \
60
+ <<-file
61
+ set :job_template, nil
62
+ job_type :some_job, "before :task after :option1"
63
+ every 2.hours do
64
+ some_job "during", :option2 => 'happy'
65
+ end
66
+ file
86
67
 
87
- should "output the defined job with that option left untouched" do
88
- assert_match /^.+ .+ .+ .+ before during after :option1$/, @output
89
- end
68
+ assert_match(/^.+ .+ .+ .+ before during after :option1$/, output)
90
69
  end
91
70
 
92
- context "A defined job that uses a :path where none is explicitly set" do
93
- setup do
94
- Whenever.stubs(:path).returns('/my/path')
71
+ test "defined job that uses a :path where none is explicitly set" do
72
+ Whenever.stubs(:path).returns('/my/path')
95
73
 
96
- @output = Whenever.cron \
97
- <<-file
98
- set :job_template, nil
99
- job_type :some_job, "cd :path && :task"
100
- every 2.hours do
101
- some_job 'blahblah'
102
- end
103
- file
104
- end
74
+ output = Whenever.cron \
75
+ <<-file
76
+ set :job_template, nil
77
+ job_type :some_job, "cd :path && :task"
78
+ every 2.hours do
79
+ some_job 'blahblah'
80
+ end
81
+ file
105
82
 
106
- should "default to using the Whenever.path" do
107
- assert_match two_hours + %( cd /my/path && blahblah), @output
108
- end
83
+ assert_match two_hours + %( cd /my/path && blahblah), output
109
84
  end
110
-
111
85
  end