Skip to content

Instantly share code, notes, and snippets.

@dpickett
Created September 26, 2012 20:55
Show Gist options
  • Save dpickett/3790528 to your computer and use it in GitHub Desktop.
Save dpickett/3790528 to your computer and use it in GitHub Desktop.
resque spec helpers
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