Created
December 2, 2010 15:10
-
-
Save supaspoida/725496 to your computer and use it in GitHub Desktop.
enable resque jobs in integration tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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