Skip to content

Commit 486295b

Browse files
committed
fix tests to run on resque-edge
1 parent 4d8e564 commit 486295b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

test/resque_hook_test.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'test_helper'
22

3-
context "Resque Hooks" do
4-
setup do
3+
describe "Resque Hooks" do
4+
before do
55
Resque.redis.flushall
66

77
Resque.before_first_fork = nil
@@ -19,13 +19,13 @@ def self.perform
1919
end
2020
end
2121

22-
test 'retrieving hooks if none have been set' do
22+
it 'retrieving hooks if none have been set' do
2323
assert_equal [], Resque.before_first_fork
2424
assert_equal [], Resque.before_fork
2525
assert_equal [], Resque.after_fork
2626
end
2727

28-
test 'it calls before_first_fork once' do
28+
it 'it calls before_first_fork once' do
2929
counter = 0
3030

3131
Resque.before_first_fork { counter += 1 }
@@ -36,7 +36,7 @@ def self.perform
3636
assert_equal(1, counter)
3737
end
3838

39-
test 'it calls before_fork before each job' do
39+
it 'it calls before_fork before each job' do
4040
counter = 0
4141

4242
Resque.before_fork { counter += 1 }
@@ -47,7 +47,7 @@ def self.perform
4747
assert_equal(2, counter)
4848
end
4949

50-
test 'it calls after_fork after each job' do
50+
it 'it calls after_fork after each job' do
5151
counter = 0
5252

5353
Resque.after_fork { counter += 1 }
@@ -58,28 +58,28 @@ def self.perform
5858
assert_equal(2, counter)
5959
end
6060

61-
test 'it calls before_first_fork before forking' do
61+
it 'it calls before_first_fork before forking' do
6262
Resque.before_first_fork { assert(!$called) }
6363

6464
Resque::Job.create(:jobs, CallNotifyJob)
6565
@worker.work(0)
6666
end
6767

68-
test 'it calls before_fork before forking' do
68+
it 'it calls before_fork before forking' do
6969
Resque.before_fork { assert(!$called) }
7070

7171
Resque::Job.create(:jobs, CallNotifyJob)
7272
@worker.work(0)
7373
end
7474

75-
test 'it calls after_fork after forking' do
75+
it 'it calls after_fork after forking' do
7676
Resque.after_fork { assert($called) }
7777

7878
Resque::Job.create(:jobs, CallNotifyJob)
7979
@worker.work(0)
8080
end
8181

82-
test 'it registeres multiple before_first_forks' do
82+
it 'it registeres multiple before_first_forks' do
8383
first = false
8484
second = false
8585

@@ -92,7 +92,7 @@ def self.perform
9292
assert(first && second)
9393
end
9494

95-
test 'it registers multiple before_forks' do
95+
it 'it registers multiple before_forks' do
9696
first = false
9797
second = false
9898

@@ -105,7 +105,7 @@ def self.perform
105105
assert(first && second)
106106
end
107107

108-
test 'it registers multiple after_forks' do
108+
it 'it registers multiple after_forks' do
109109
first = false
110110
second = false
111111

0 commit comments

Comments
 (0)