Move resque modifications out to spec/support
This commit is contained in:
parent
8d62ad8896
commit
9ba43b148f
3 changed files with 15 additions and 9 deletions
|
|
@ -15,8 +15,14 @@ namespace :fixtures do
|
|||
require File.join(Rails.root,"spec/helper_methods")
|
||||
require File.join(Rails.root,"spec/factories")
|
||||
require File.join(Rails.root,"spec/support/user_methods")
|
||||
require File.join(Rails.root,"spec/support/fake_resque")
|
||||
|
||||
include HelperMethods
|
||||
|
||||
Jobs::HttpPost.class_eval do
|
||||
def self.perform(*args)
|
||||
end
|
||||
end
|
||||
fantasy_resque do
|
||||
models = []
|
||||
Factory(:person)
|
||||
|
|
|
|||
|
|
@ -54,15 +54,6 @@ class FakeRedis
|
|||
true
|
||||
end
|
||||
end
|
||||
module Resque
|
||||
def enqueue(klass, *args)
|
||||
if $process_queue
|
||||
klass.send(:perform, *args)
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ImageUploader.enable_processing = false
|
||||
|
||||
|
|
|
|||
9
spec/support/fake_resque.rb
Normal file
9
spec/support/fake_resque.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module Resque
|
||||
def enqueue(klass, *args)
|
||||
if $process_queue
|
||||
klass.send(:perform, *args)
|
||||
else
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue