Permalink
Browse files

Fixing test using enqueue_to.

  • Loading branch information...
1 parent a00b086 commit ae19eda40e0d0f25a7b618487e1065c34f62750a @ryansch ryansch committed Nov 8, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/loner_spec.rb
View
@@ -117,8 +117,14 @@ def self.perform(foo); end
end
it "should report if a job is in a special queue or not" do
- Resque.enqueue_to :special_queue, SomeUniqueJob, "foo"
+ default_queue = SomeUniqueJob.instance_variable_get(:@queue)
+ SomeUniqueJob.instance_variable_set(:@queue, :special_queue)
+
+ Resque.enqueue SomeUniqueJob, "foo"
Resque.enqueued_in?( :special_queue, SomeUniqueJob, "foo").should be_true
+
+ SomeUniqueJob.instance_variable_set(:@queue, default_queue)
+
Resque.enqueued?( SomeUniqueJob, "foo").should be_false
end

0 comments on commit ae19eda

Please sign in to comment.