Skip to content

Commit e06fbc6

Browse files
committed
add very verbose test back
1 parent 81f8469 commit e06fbc6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/worker_test.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,25 @@ def self.perform
399399
assert !$BEFORE_FORK_CALLED, "before_fork should not have been called after job runs"
400400
end
401401

402+
test "very verbose works in the afternoon" do
403+
begin
404+
require 'time'
405+
last_puts = ""
406+
Time.fake_time = Time.parse("15:44:33 2011-03-02")
407+
408+
@worker.extend(Module.new {
409+
define_method(:puts) { |thing| last_puts = thing }
410+
})
411+
412+
@worker.very_verbose = true
413+
@worker.log("some log text")
414+
415+
assert_match /\*\* \[15:44:33 2011-03-02\] \d+: some log text/, last_puts
416+
ensure
417+
Time.fake_time = nil
418+
end
419+
end
420+
402421
test "Will call an after_fork hook if we're forking" do
403422
Resque.redis.flushall
404423
$AFTER_FORK_CALLED = false

0 commit comments

Comments
 (0)