Commit 644913c2b951f7b9f37f98a84bb10df66c116143
1 parent
735dda1a
Exists in
master
and in
29 other branches
Delayed jobs will run synchronously when RAILS_ENV is test or cucumber
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
vendor/plugins/delayed_job/lib/delayed/message_sending.rb
... | ... | @@ -33,7 +33,7 @@ module Delayed |
33 | 33 | |
34 | 34 | module ClassMethods |
35 | 35 | def handle_asynchronously(method) |
36 | - return if Rails.env == "test" | |
36 | + return if (Rails.env == "test" or Rails.env == "cucumber") | |
37 | 37 | aliased_method, punctuation = method.to_s.sub(/([?!=])$/, ''), $1 |
38 | 38 | with_method, without_method = "#{aliased_method}_with_delay#{punctuation}", "#{aliased_method}_without_delay#{punctuation}" |
39 | 39 | define_method(with_method) do |*args| | ... | ... |