File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.2.0 (2009-??-??)
2
+
3
+ * Raise when a job class does not respond to ` perform ` .
4
+
1
5
## 1.1.0 (2009-11-04)
2
6
3
7
* Bugfix: Broken ERB tag in failure UI
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ def self.reserve(queue)
58
58
# Calls #perform on the class given in the payload with the
59
59
# arguments given in the payload.
60
60
def perform
61
- return unless payload_class && payload_class . respond_to? ( :perform )
62
61
args ? payload_class . perform ( *args ) : payload_class . perform
63
62
end
64
63
Original file line number Diff line number Diff line change 91
91
end
92
92
end
93
93
94
+ test "fails if a job class has no `perform` method" do
95
+ worker = Resque ::Worker . new ( :perform_less )
96
+ Resque ::Job . create ( :perform_less , Object )
97
+
98
+ assert_equal 0 , Resque ::Failure . count
99
+ worker . work ( 0 )
100
+ assert_equal 1 , Resque ::Failure . count
101
+ end
102
+
94
103
test "inserts itself into the 'workers' list on startup" do
95
104
@worker . work ( 0 ) do
96
105
assert_equal @worker , Resque . workers [ 0 ]
You can’t perform that action at this time.
0 commit comments