Permalink
Browse files

test for https://github.com/defunkt/resque/issues/557

  • Loading branch information...
1 parent 80a5e55 commit 4de741ff2d47d304ee8a78570d41c52de04c9d8f @ono ono committed with steveklabnik Sep 25, 2012
Showing with 17 additions and 0 deletions.
  1. +10 −0 test/resque_test.rb
  2. +7 −0 test/test_helper.rb
View
@@ -276,6 +276,16 @@
end
end
+ it "inlining jobs in inline job" do
+ begin
+ Resque.inline = true
+ Resque.enqueue(NestedJob)
+ assert_equal 0, Resque.size(:ivar)
+ ensure
+ Resque.inline = false
+ end
+ end
+
it 'treats symbols and strings the same' do
assert_equal Resque.queue(:people), Resque.queue('people')
end
View
@@ -76,6 +76,13 @@ class SomeIvarJob < SomeJob
@queue = :ivar
end
+class NestedJob
+ @queue = :nested
+ def self.perform
+ Resque.enqueue(SomeIvarJob, 20, '/tmp')
+ end
+end
+
class SomeMethodJob < SomeJob
def self.queue
:method

0 comments on commit 4de741f

Please sign in to comment.