Skip to content

Instantly share code, notes, and snippets.

@supaspoida
Created December 2, 2010 15:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save supaspoida/725496 to your computer and use it in GitHub Desktop.
Save supaspoida/725496 to your computer and use it in GitHub Desktop.
enable resque jobs in integration tests
module ResqueHelper
def with_resque
Resque.module_eval do
def self.enqueue(task, *args)
task.perform(*args)
end
end
yield
Resque.module_eval do
def self.enqueue(task, *args)
end
end
end
end
RSpec.configure do |config|
config.include ResqueHelper
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment