Created
September 26, 2012 20:55
-
-
Save dpickett/3790528 to your computer and use it in GitHub Desktop.
resque spec helpers
This file contains 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 ClassMethods | |
def run_all_with_inline_worker | |
before(:all) do | |
Resque.inline = true | |
end | |
after(:all) do | |
Resque.inline = false | |
end | |
end | |
end | |
module InstanceMethods | |
def with_inline_worker(&block) | |
Resque.inline = true | |
res = yield | |
Resque.inline = false | |
res | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment